Change a particular group's GID on files system-wide

Change a particular group's GID on files system-wide

Post by Anthony Mandi » Thu, 24 Dec 1998 04:00:00




> I know I can change the name of a group easily by just changing the name in
> the /etc/group file.  It will immediately be reflected by 'ls' etc. because
> the group file is referenced each time to get the group name.

> However, I want to re-organize my group numbers (GIDs) around a different
> numbering scheme (100's for such-and-such, 200's for such-and-such, 1000's for
> such-and-such).

> Is there a way to change the GID # of a group easily, as with the group name?
> Otherwise, is there a script already coded (I'm so lazy ;) that does this?

        Its too trivial for that. Just add the new group in /etc/group (you'd
        change the group name later when you delete the old one), and then
        use find/chgrp to do the search and replace for you.

-am

 
 
 

Change a particular group's GID on files system-wide

Post by Arindum Muker » Thu, 24 Dec 1998 04:00:00



>On Tue, 22 Dec 1998 23:39:28 GMT, in article

>>I know I can change the name of a group easily by just changing the name in
>>the /etc/group file.  It will immediately be reflected by 'ls' etc. because
>>the group file is referenced each time to get the group name.

>>However, I want to re-organize my group numbers (GIDs) around a different
>>numbering scheme (100's for such-and-such, 200's for such-and-such, 1000's for
>>such-and-such).

>>Is there a way to change the GID # of a group easily, as with the group name?
>>Otherwise, is there a script already coded (I'm so lazy ;) that does this?

>>thanks,

>find / -group oldgid -exec chgrp newgid {} \;

You probably want a -h in that chgrp.

As in find / -group oldgid -exec chgrp -h newgid {} \;

Arindum

--

 
 
 

1. change to new gid or new group name all files of given group name or gid

Hello,

I need to reorganize group names and gid in a server.

If possible could you send me the command line or korn shell to change
to a new group id number and new group name for all the files of a given
old group name or old gid in all the file systems.

Off course, new group name and new gid have already being defined in
/etc/group and also user have being updated to new gid in /etc/passwd.

Thank you very much,

Mario Desiderio

2. Looking for AIX 433.

3. change group name and gid for all files of given old group name or old gid

4. [FB PATCH] cfbimgblt isn't 64-bit clean

5. File group permissions - applicable to a particular group user only possible??

6. Problem with GUI for Inspiron 2650 running Redhat Linux 8.0

7. Assistance with a system wide file uid change

8. Backup machine

9. Tripwire reporting setuid/gid changes & changes can't be verified.

10. How to change system-wide search path?

11. Where to install system-wide application config files?

12. System-wide number of open files in 2.4/2.5?

13. Where is the system-wide Xdefaults file ??