LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-03-2011, 10:02 AM   #1
linuxdistroyer
LQ Newbie
 
Registered: Apr 2011
Distribution: 5.4.0-71-generic #79-Ubuntu x86_64 x86_64 x86_64 GNU/Linux Mint 20.1
Posts: 4

Rep: Reputation: Disabled
cannot find username for UID 500


I am using CentOS 4.8 I was doing some updates. Now I get "cannot find username for UID 500" here are some outputs,

repeater@irlp's password:
Last login: Sat Apr 2 09:16:27 2011 from 192.168.0.151
-bash: /etc/profile: Permission denied
-bash-3.00$
-bash-3.00$ whoami: cannot find username for UID 500

and should be,
repeater@irlp4745 etc]#





[root@irlp4745 etc]# getent passwd repeater
repeater:x:500:500::/home/irlp:/bin/bash
[root@irlp4745 etc]# getent group 500
repeater:x:500:repeater

Root is Ok.
Seems somehow the name is no longer linked with UID. I searched the web and didn't find any thing specific, I am at a loss.

Solved;
other than user, group chmod was set wrong to /etc and also do a usermod -s to repeater. and set the login repeater to /home/irlp. TNX for the help!

Last edited by linuxdistroyer; 04-04-2011 at 11:14 AM. Reason: Solved
 
Old 04-03-2011, 11:16 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,286

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
Have you tried useradd or usermod ? I'd add a luser - you can delete him again. That way you get a clear error. Check perms on /etc/profile.
-rw-r--r-- 1 root root 2288 2010-12-04 09:13 /etc/profile
drwxr-xr-x 2 root root 4096 2010-09-09 16:42 /etc/profile.d

I think you may be in danger of developing serious issues. Don't take chances. I'd keep a few terminals open.
 
Old 04-04-2011, 02:55 AM   #3
ongte
Member
 
Registered: Jun 2009
Location: Penang, Malaysia
Distribution: Mageia, CentOS, Ubuntu
Posts: 468

Rep: Reputation: 72
Check out the shadow copy files: /etc/shadow and /etc/gshadow
These store the shadow copy used for consistency checks.
Make sure /etc/passwd stays in sync with /etc/shadow & likewise for /etc/group with /etc/gshadow
 
Old 04-07-2011, 03:06 AM   #4
geo.jose555
LQ Newbie
 
Registered: Mar 2010
Posts: 1

Rep: Reputation: 0
Thumbs up check permission

Please check the permissions of the following files:

/etc/passwd
/etc/shadow
/etc/group
/etc/gshadow
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Files have owner as uid number rather than username prollocks Red Hat 4 11-18-2009 07:08 PM
ps -ef shows UID rather than username bazzagazza Linux - Newbie 5 05-10-2007 04:16 AM
Obtaining uid from username JPrieSL Programming 4 04-20-2007 08:31 AM
How to add a user with UID =500 KWTm Ubuntu 1 10-29-2005 11:47 AM
Getting uid and/or username of logged in user rjstephens Programming 5 09-23-2004 05:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:44 PM.

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
Open Source Consulting | Domain Registration