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

Re: Users, groups and directory access



On Tue, 2004-05-04 at 23:52, A.J. Bonnema wrote:
> Hi,
> 
> I have a simple access I would like to solve. Reading the RedHat 
> documentation on users and groups didn't help sufficiently. Maybe one of 
> you guys, sysadmins, could help?
> 
> I'm running a up to date Fedora core 1 (no test packages).
> 
> The problem is:
> 
> 1. I have a user let's say john with two gid's: one for john and one for 
>   proj. The group john is his primary group.
> 
> 2. I also have a directory owned by user paul and he want everyone in 
> group proj to be able to read and write and create directories and files 
> in his directory /project. So (using the reference guide from red hat) 
> he creates a directory /project and has the admin do the following 
> sequence of commands:
> 
> /usr/sbin/groupadd proj
> chown -R paul.proj /project
> /usr/bin/gpasswd -a john proj
> chmod 2775 /project

# create proj group
groupadd proj

# make an administrator own the root dir. paul.proj is also fine...
chown -R root.proj /project

# make permissions inherit to children...
chmod g+rwxs /project

# root can change john's group membership like this
usermod -G proj john


# which should be equivalent to this but I've had trouble with it
gpasswd -a john proj

# in theory, this would make Paul proj's administrator
gpasswd -A paul proj


# to verify john was added where he belongs:
grep john /etc/groups

> Now I have 2 questions:
> 1. Is there any way, to have all groups a user is member of, effective 
> simultaneously?

Yes, logout and login.  Group membership only becomes effective at
login.

> 2.
> How can john change his primary group on the commandline?

newgrp proj

-- 
 David Norris
  http://www.webaugur.com/dave/
  ICQ - 412039

Attachment: signature.asc
Description: This is a digitally signed message part


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