LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 05-02-2013, 11:27 AM   #1
Mycado
Member
 
Registered: Jun 2006
Location: Paris, France
Distribution: RHEL
Posts: 73

Rep: Reputation: 15
Question Cannot find users in /etc/shadow or /etc/passwd...


Hello,

I have a user named "user1", which is defined by:

Code:
[root@xx/]# id user1
uid=4351(user1) gid=750(group1) groups=750(group1) context=user_u:system_r:unconfined_t
But there is nothing about this user in my /etc/passwd or /etc/shadow:

Code:
[root@xx/]# more /etc/passwd | grep user1
[root@xx/]# more /etc/shadow | grep user1
[root@xx/]#
Where else can I search for this user ?
 
Old 05-02-2013, 11:34 AM   #2
shivaa
Senior Member
 
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,800
Blog Entries: 4

Rep: Reputation: 286Reputation: 286Reputation: 286
Just invoke:
Code:
~# finger user1
The id command is showing you the user because (as far as I am concerned), it primarily consults /etc/group file, not /etc/passwd or shadow.

You can also try to reboot your system and then check again.

Last edited by shivaa; 05-02-2013 at 11:35 AM.
 
Old 05-02-2013, 12:09 PM   #3
Mycado
Member
 
Registered: Jun 2006
Location: Paris, France
Distribution: RHEL
Posts: 73

Original Poster
Rep: Reputation: 15
I did a finger, but not so much informations. Still don't know where to edit/configure it :

Code:
[root@h1l1ikebu /]# finger user1
Login: user1                            Name: (null)
Directory: /home/user1                  Shell: /bin/csh
Last login Thu Mar 14 10:13 (CET) on pts/15 from 10.xx.xx.xx
New mail received Fri Mar 29 13:38 2013 (CET)
     Unread since Wed Feb 27 11:16 2013 (CET)
No Plan.
For information, nothing more in /etc/group

Code:
[root@xx /]# more /etc/group | grep user1
[root@xx /]#
 
Old 05-02-2013, 01:34 PM   #4
shivaa
Senior Member
 
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,800
Blog Entries: 4

Rep: Reputation: 286Reputation: 286Reputation: 286
A reboot will certainly solve this issue. Also let's know are you using local files for user management or do you use any NIS or Ldap like naming services?
 
Old 05-02-2013, 10:14 PM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
A central auth service like LDAP etc is likely.
I could be wrong, but I don't see a reboot deleting that user.

check the /etc/nsswitch.conf file to see what 'databases' it uses to auth users.
You can check each one with the getent cmd & specify each auth src until you find where user1 is registered.
http://linux.die.net/man/1/getent
 
Old 05-03-2013, 04:24 AM   #6
Mycado
Member
 
Registered: Jun 2006
Location: Paris, France
Distribution: RHEL
Posts: 73

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by shivaa View Post
A reboot will certainly solve this issue. Also let's know are you using local files for user management or do you use any NIS or Ldap like naming services?
I searched for LDAP before, but... forgot to search about NIS. There is some NIS/Portmap processes running.
Thanks for your help!
 
Old 05-03-2013, 05:40 AM   #7
shivaa
Senior Member
 
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,800
Blog Entries: 4

Rep: Reputation: 286Reputation: 286Reputation: 286
If NIS is running, then you will be able to invoke following cmds and fetch user's info.
Code:
~$ ypmatch user1 passwd
~$ ypmatch user1 group
 
  


Reply

Tags
passwd, shadow, users


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
shadow and passwd idlehands Linux - Security 2 07-28-2010 04:04 PM
Integrating MySQL and shadow passwd users/passwords wenberg Linux - Software 0 03-02-2005 05:02 PM
It is ok if i unshadow the /etc/passwd and /etc/shadow Paxmaster Linux - Software 1 01-12-2005 11:07 PM
mismatch with /etc/passwd and /etc/shadow AngryKeebler Linux - General 1 07-23-2004 04:42 PM
/etc/passwd or /etc/shadow? tiger7007 Linux - Security 2 03-21-2004 05:41 AM


All times are GMT -5. The time now is 12:37 AM.

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