Re: useradd and the default group

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

 



On Mon, 2009-04-13 at 16:28 +0000, Carl D. Roth wrote:
> Can some one explain the following weird behavior with useradd?
> 
>   # useradd -g mock -r -m -d /var/lib/mockuser mockuser
> 
>   --> create a new 'mockuser' user that can be used to run /usr/bin/mock
> 
>   # id mockuser
>   uid=494(mockuser) gid=491(mock) groups=491(mock)
> 
>   # grep mock /etc/group
>   mock:x:491:roth
> 
> Hm, that's interesting, 'mockuser' is not in the 'mock' group.  This can 
> be verified using 'getgrent()'.
> 
>   # usermod -G mock mockuser
> 
>   --> seems redundant...
> 
>   # id mockuser
>   uid=494(mockuser) gid=491(mock) groups=491(mock)
> 
>   --> group membership did not change
> 
>   # grep mock /etc/group
>   mock:x:491:roth,mockuser
> 
>   --> but the group's membership list did change
> 
> Thanks!
> 
I suspewct that the fact that the mock user already exists by default on
the system has something to do with the problem.
--
=======================================================================
"Whoever undertakes to set himself up as a judge of Truth and Knowledge
is shipwrecked by the laughter of the gods." -- Albert Einstein
=======================================================================
Aaron Konstam telephone: (210) 656-0355 e-mail: akonstam@xxxxxxxxxxxxx

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux