Solved

strange user

Posted on 2009-06-30
4
235 Views
Last Modified: 2012-05-07
Hi,

I have a user with strange settings. If i try to find this user in /etc/group, i don't find it mentioned anywhere. But when I run the command "id username", it shows the groups the user belongs to.

id nicole
uid=504(nicole) gid=501(admin) groups=501(admin) context=user_u:system_r:unconfined_t

[root@unix etc]# grep nicole /etc/group

The last command doesn't output anything.

Why is it happening such ? I am confused...

By the way, is it something like the user has been deleted from /etc/group, but the group database has not been updated. If so, where do I find the group database file ??
Thank you

0
Comment
Question by:its_ns_04
4 Comments
 
LVL 3

Expert Comment

by:Michal-Drozd
ID: 24748489
In the /etc/group file, a user does not need to be added to its primary group. The connection is established in /etc/passwd only. So, if my primary group is 'users' and secondary, 'work' I will only see the username appended to work in the /etc/group file.

I believe this was done to limit the length of lines in /etc/group quite some time ago. However, it is nothing to worry about and the system is behaving as expected.
0
 
LVL 7

Accepted Solution

by:
martin_2110 earned 500 total points
ID: 24748503
It looks like the person who created the user specified a diffrent group useradd -g admin  nicole would have done this.
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 24748582
Could be NIS.

To check issue

ypcat group | grep nicole

'ypcat: not found'  - no NIS, and I'm on the wrong track.

0
 
LVL 40

Expert Comment

by:omarfarid
ID: 24795282
the primary group in which the user is in is not mentioned in /etc/group, but it is in the /etc/passwd file in the gid filed
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now