bug-sh-utils
[Top][All Lists]
Advanced

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

Re: usermod -G does not take effect immediately


From: garg
Subject: Re: usermod -G does not take effect immediately
Date: Wed, 29 Oct 2003 14:46:21 -0500
User-agent: Mutt/1.4i

On Wed, Oct 29, 2003 at 11:53:20AM -0700, Bob Proulx wrote:
> address@hidden wrote:
> >   used 'usermod -G users,demo3 garg' to
> > add user 'garg' to the users and demo3 groups.
> 
> Just curious, but what directed your 'usermod' question to shellutils?
> 'usermod' are other folks.  But I can answer your question anyway.

Thanks for your prompt response. I took the email address
off the 'groups --help' command, assuming that maybe groups
command was not re-loading some data.

> 'usermod' and others set up the /etc/passwd and other files.  They
> don't actually change anything in process space.  Those files only
> have effects when you log in.  So to make those other groups take
> effect you need to log in.  Usually that would mean that you need to
> log out first and then log back in.

Yes, that's what was going on. I logged out of my X session, and
re-stared the parent process from which I issued 'startx' and then
every process seemed to have the right groups.

IMHO, usermod could possibly try to inform active user processes of
the change in group memberships. Or, alternatively, the process should
have some way of doing a lazy evaluation, in case things have changed
since it last looked.

Pankaj








reply via email to

[Prev in Thread] Current Thread [Next in Thread]