Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 05-31-2012, 10:57 AM   #1
LQ Newbie
Registered: May 2012
Posts: 11

Rep: Reputation: 0
Strange behavior / User missing from group file

I'm new to *nix, though i have tried to learn the basics.

I have a cent os vps instance with plesk installed.

I have a user called joe which is, for some reason part of group psacln.

When i type
#id joe

this is the output i get
#uid=10001(joe) gid=2523(psacln) groups=2523(psacln)

but when i type
#getent group psacln

the system returns

Why doesn't the user joe appear as part of group psacln although he is?

I have checked etc/group and joe doen't appear anywhere on the file. Joe is able to log in through SSH and browse the most of the server, including files with primary group Root.

What am i missing?
Old 05-31-2012, 01:10 PM   #2
LQ Guru
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,945
Blog Entries: 14

Rep: Reputation: 1163Reputation: 1163Reputation: 1163Reputation: 1163Reputation: 1163Reputation: 1163Reputation: 1163Reputation: 1163Reputation: 1163
When you use id it is reading /etc/passwd and determining joe's default group ID (GID) from that file then getting the group name associated with that GID from /etc/group.

When you use getent group it is ONLY reading /etc/group so is only showing you people that have secondary group membership as they are the only ones that appear there.

See the difference between -g and -G in "useradd" and "usermod" commands by reviewing man pages for them.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Strange file permissions and ownership behavior xiztrn Linux - Newbie 6 12-22-2011 04:14 AM
[SOLVED] Strange Mount Behavior After Unexpected Shutdown Mid File Transfer bdjnk Linux - Desktop 2 08-06-2010 04:05 PM
strange (to me) behavior of file permissions when copying file warrob Linux - General 10 10-25-2009 05:13 AM
Strange file behavior nc3b Linux - General 2 08-23-2006 01:27 PM
strange group in User Manager..... Decepticon22 Linux - Security 1 06-27-2006 02:40 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:16 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration