select users in a group?

Started by Johnson, Shaunnalmost 24 years ago6 messagesgeneral
Jump to latest
#1Johnson, Shaunn
SJohnson6@bcbsm.com

Howdy:

I'm running Postgres 7.1.3 on RedHat Linux 2.4.7-rel 10.

How can I get a list of the users in a group? For example,
I created a group called 'staff' ... I know there are five people
in this group, but how can I *see* everyone in this group?

Thanks!

-X

#2Johnson, Shaunn
SJohnson6@bcbsm.com
In reply to: Johnson, Shaunn (#1)
Re: select users in a group?

--WAIT ... I'm sorry ... by bad ...

--I'm looking at the table pg_group and I see
the group 'staff' listed ... along the lines, I see
what I can only assume is the UID-ish numbers
of the users that are in the group.

--NOW ... I want to go from THAT point to figuring
out who those people are ...

--Hope I caught this in time ...

-X

-----Original Message-----

Howdy:

I'm running Postgres 7.1.3 on RedHat Linux 2.4.7-rel 10.

How can I get a list of the users in a group? For example,
I created a group called 'staff' ... I know there are five people
in this group, but how can I *see* everyone in this group?

Thanks!

-X

#3Nigel J. Andrews
nandrews@investsystems.co.uk
In reply to: Johnson, Shaunn (#2)
Re: select users in a group?

On Wed, 17 Apr 2002, Johnson, Shaunn wrote:

--WAIT ... I'm sorry ... by bad ...

--I'm looking at the table pg_group and I see
the group 'staff' listed ... along the lines, I see
what I can only assume is the UID-ish numbers
of the users that are in the group.

--NOW ... I want to go from THAT point to figuring
out who those people are ...

--Hope I caught this in time ...

-X

-----Original Message-----

Howdy:

I'm running Postgres 7.1.3 on RedHat Linux 2.4.7-rel 10.

How can I get a list of the users in a group? For example,
I created a group called 'staff' ... I know there are five people
in this group, but how can I *see* everyone in this group?

Thanks!

-X

Now, it's just a suggestion as I've not used arrays before but have you tried
something like:

SELECT u.usename FROM pg_user u WHERE EXISTS (SELECT 1 FROM pg_group g WHERE
g.grolist *= u.usesysid);

You should look up arrays in the documentation since I see from there that the
*= operator is probably an extension you need to install.

--
Nigel J. Andrews
Director

---
Logictree Systems Limited
Computer Consultants

#4Bruce Momjian
bruce@momjian.us
In reply to: Nigel J. Andrews (#3)
Re: select users in a group?

Those numbers are user id's. If you look in pg_user you will see the
numbers of each user.

Now, we really should have a way of listing the users in a group more
easily.

Added to TODO:

* Allow easy display of usernames in a group

---------------------------------------------------------------------------

Nigel J. Andrews wrote:

On Wed, 17 Apr 2002, Johnson, Shaunn wrote:

--WAIT ... I'm sorry ... by bad ...

--I'm looking at the table pg_group and I see
the group 'staff' listed ... along the lines, I see
what I can only assume is the UID-ish numbers
of the users that are in the group.

--NOW ... I want to go from THAT point to figuring
out who those people are ...

--Hope I caught this in time ...

-X

-----Original Message-----

Howdy:

I'm running Postgres 7.1.3 on RedHat Linux 2.4.7-rel 10.

How can I get a list of the users in a group? For example,
I created a group called 'staff' ... I know there are five people
in this group, but how can I *see* everyone in this group?

Thanks!

-X

Now, it's just a suggestion as I've not used arrays before but have you tried
something like:

SELECT u.usename FROM pg_user u WHERE EXISTS (SELECT 1 FROM pg_group g WHERE
g.grolist *= u.usesysid);

You should look up arrays in the documentation since I see from there that the
*= operator is probably an extension you need to install.

--
Nigel J. Andrews
Director

---
Logictree Systems Limited
Computer Consultants

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
#5Jeff Post
postjeff@uwm.edu
In reply to: Bruce Momjian (#4)
PERL DBI and Novell Netware

Hello all,
I am in the investigation phase of a potential project that would
automaticly update a novell Netware server's user accounts with information
stored on PostgreSQL Database running on a linux box through a perl script.

Currently Netware has support for
� Database Independent Interface (DBI)
� NetWare Data Object (NDO) UCX Component
� Remote ActiveX Provider and ADO Component on Windows machine

Through DBI, Netware can remotely connect to Oracle on NetWare or MS-Access,
SQL Server and Oracle, all on Windows

Is anybody out there familure enough with dbi and Novell to be able to tell
me how I can get a perl script running on Netware to connect to a
PostgreSQL/Linux box.

Or if it is way to complicated / know one knows. Please send an e-mail to
Enhancements@novell.com to ask that they add PostgreSQL support to Netware.

Thanks
Jeff Post

#6Noname
wsheldah@lexmark.com
In reply to: Jeff Post (#5)
Re: PERL DBI and Novell Netware

I'm not familiar with Novell, but if a perl script on a Novell box can connect
to Oracle via DBI, than it can connect to PostgreSQL just as easily. You'll want
to use the perl modules DBI and DBD::Pg. Also make sure that Postgresql is set
up to listen for requests via TCP/IP. Shouldn't be any harder than that.

Wes

Jeff Post <postjeff%uwm.edu@interlock.lexmark.com> on 04/17/2002 06:35:34 PM

To: pgsql-general%postgresql.org@interlock.lexmark.com
cc: (bcc: Wesley Sheldahl/Lex/Lexmark)
Subject: [GENERAL] PERL DBI and Novell Netware

Hello all,
I am in the investigation phase of a potential project that would
automaticly update a novell Netware server's user accounts with information
stored on PostgreSQL Database running on a linux box through a perl script.

Currently Netware has support for
? Database Independent Interface (DBI)
? NetWare Data Object (NDO) UCX Component
? Remote ActiveX Provider and ADO Component on Windows machine

Through DBI, Netware can remotely connect to Oracle on NetWare or MS-Access,
SQL Server and Oracle, all on Windows

Is anybody out there familure enough with dbi and Novell to be able to tell
me how I can get a perl script running on Netware to connect to a
PostgreSQL/Linux box.

Or if it is way to complicated / know one knows. Please send an e-mail to
Enhancements@novell.com to ask that they add PostgreSQL support to Netware.

Thanks
Jeff Post

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org