Hi Folks: A couple weeks ago, the list helped me develop the way to find the UID of users on my AD system. At the time I did not think that it would be necessary to know the GID of the AD Groups, but I am hitting some snags where I need to change the group ownership of folders etc. I suspect that the necessary command is a variant of the getent command, but man getent has not yielded where I should look for them. Can someone point me in the right direction. Specifically, what I am looking for is a command that will allow me to generate a list of all the user groups on the system and their GID. This will allow me to chgrp the folders as necessary. Thanks TIM Timothy A. Holmes IT Manager / Webmaster / Computer Teacher Medina Christian Academy A Higher Standard... Jeremiah 33:3 Jeremiah 29:11 Esther 4:14
Tim Holmes [tholmes@mcaschool.net] wrote:> > Can someone point me in the right direction. Specifically, what I am > looking for is a command that will allow me to generate a list of all > the user groups on the system and their GID. This will allow me to > chgrp the folders as necessary.getent groups ;-))) Generally, "getent" is meant to dump the contents of every NSS database that supports enumeration. Of course what you'd enumerate depends on your privileges too. You will find all databases unix machine uses in /etc/nsswitch.conf. There are also utilities for working with individual databases. For example "id" for "getent passwd", "groups" for "getent groups". Cheers, -- Michal Kurowski perl -e '$_=q#: 13_2: 12/o{>: 8_4) (_4: 6/2^-2; 3;-2^\2: 5/7\_/\7: 12m m::#; y#:#\n#;s#(\D)(\d+)#$1x$2#ge;print'
> Tim Holmes [tholmes@mcaschool.net] wrote: > > > > Can someone point me in the right direction. Specifically, what Iam> > looking for is a command that will allow me to generate a list ofall> > the user groups on the system and their GID. This will allow me to > > chgrp the folders as necessary. > > getent groups > > ;-))) > > Generally, "getent" is meant to dump the contents of every NSS > database that supports enumeration. Of course what you'd enumerate > depends on your privileges too. You will find all databases unix > machine uses in /etc/nsswitch.conf. > > There are also utilities for working with individual databases. > For example "id" for "getent passwd", "groups" for "getent groups". > > Cheers, > > -- > Michal Kurowski[Tim Holmes] Michal: here is the output [root@srvfs-02 ~]# getent groups Unknown database: groups Try `getent --help' or `getent --usage' for more information. [root@srvfs-02 ~]# Tim