[LUGA] Mit freundlicher Unterstützung von:

Mail Thread Index

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: adduser auf redhat

> Was ist das für ein schwachsinniges adduser-Script am Spirit?
> [root@spirit hjp]# adduser -\?
> Looking for first available UID... 508
> Looking for first available GID... 501
> Adding login: -?...done.
> Creating home directory: /home/-?...done.
> Creating mailbox: /var/spool/mail/-?...done.
> Don't forget to set the password.
> [root@spirit hjp]#
Schaut nach RedHat-Linux aus (wenn nicht, sorry, aber die machen es 
so oder so ähnlich):

Zitat aus der RedHat-FAQ:
4.2 Why does Red Hat `adduser' put each user in his/her own group?

It's called the user group scheme, and it's described in the manual. 
What it basically does is allow you to use groups to allow multiple 
people to use a common set of files and
edit them, transparently. It goes like this: 

       You'd like to have a group of people work on a set of files is 
say, the ``/usr/lib/emacs/site-lisp'' directory. You trust a few 
people to mess around in there, but certainly
       not everyone. 
       So you do ``chown -R root.emacs /usr/lib/emacs/site-lisp''. 
And you add the proper users to the group. 
       To allow the users to actually create files in the directory 
you do ``chmod 775 /usr/lib/emacs/site-lisp''. 
       This is fine, but when a user creates a new file it gets the 
group of the users default group (usually users). 
       To prevent this you do `chmod 2775 /usr/lib/emacs/site-lisp' 
which causes everything in the directory to get created with the 
``emacs'' group. 
       This is fine, but the new file needs to be mode 664 for 
another user in the emacs group. To do this you make the default 
umask 002. 
       Well, this all works good, except that if your default group 
is ``users'', every file you create in your home directory will be 
writable by everybody in ``users'' (usually
       To fix this, you make each user have a ``private group'' as 
their default group. 

At this point, by making the default umask 002 and giving everyone a 
private default group, you can easily set up groups which users can 
take advantage of without doing any
magic. Just create the group, add the users, and do the above chown 
and chmod on the group's directories.


powered by LINUX the choice of a gnu generation
linux user group austria;
Letzte Änderung:
September 2010