How to change some GID

Sebastian M=?ISO-8859-1?B?/A==?=sch sebastian at sebastian-muesch.de
Sat Apr 2 08:04:23 UTC 2005


Hi,

Once upon a time Olivier Vogel wrote:

> Let me first explain my situation.
> 
> I would like to introduce Ubuntu in my school. All the computers are
> Macintosh, working with Mac OS X. There is a ldap database of users and
> all the home directories are on a server (with Mac OS X Server). I did
> success to manage the login to the server. So the problem is not here.
>
> ...
>
> Only the change for the audio group has succeeded and not the others. I
> have tried with Terminal
> sudo groupmod -g 2024 cdrom (without success)
> sudo groupmod -o -g 2024 cdrom (seems to success)
> 
> But, after these changes, the automounting of cdrom doesn't work
> anymore. So I have to restore cdrom to gid 24.

Sure it won't function. You changed the gid of the group, but the files and
directories owned by gid 24 are not automatically changed to 2024. The
file-permissions are stored with the numeric gid not the symbolic name.

So what you need to do is to change the gid of the files and dirs too.

This simple bash-script appended to this mail should do the task for you.
But be aware I didn't test the script. It must be run as root.
You'll have to run the script each time you've done an update of the
ubuntu-box, as there may be added new files by an update, which are not set
to the right group.

cu
Sebastian

-- 
        .:'
     _ :'_
   .`_`-'_`.     Sebastian Müsch
  :__|\ /|__:      sebastian at sebastian-muesch.de
  :__| S |__:
  :__|   |__:     iTunes ist aus :-(
   `._.-._.'

-------------- next part --------------
A non-text attachment was scrubbed...
Name: changefilegids.sh
Type: application/octet-stream
Size: 1787 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20050402/239ec133/attachment.obj>


More information about the ubuntu-users mailing list