LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 11-22-2006, 02:47 PM   #1
m2azer
Member
 
Registered: Sep 2004
Location: USA
Distribution: red hat, fedora & centos
Posts: 202

Rep: Reputation: 30
I have no name


Hello,

whenever i log into my redhat command line i get
login as: john
john@192.168.1.60's password:
Last login: Wed Nov 22 15:28:45 2006 from 192.168.1.151
id: cannot find name for user ID 500
id: cannot find name for user ID 500


and the prompt will look like:
[I have no name!@localhost ~]$

have anybody seen that before

Thanks
 
Old 11-22-2006, 02:50 PM   #2
Micro420
Senior Member
 
Registered: Aug 2003
Location: Berkeley, CA
Distribution: Mac OS X Leopard 10.6.2, Windows 2003 Server/Vista/7/XP/2000/NT/98, Ubuntux64, CentOS4.8/5.4
Posts: 2,986

Rep: Reputation: 45
Haha@ funny stuff. Login as user root. Then create a new user
Code:
useradd -m username
passwd username
 
Old 11-22-2006, 02:58 PM   #3
m2azer
Member
 
Registered: Sep 2004
Location: USA
Distribution: red hat, fedora & centos
Posts: 202

Original Poster
Rep: Reputation: 30
I did that but it didn't work
 
Old 11-22-2006, 03:02 PM   #4
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65
what does this show?
Code:
grep -i john /etc/passwd |cut -d: -f3,5
 
Old 11-22-2006, 03:07 PM   #5
spectra
Member
 
Registered: Nov 2006
Location: UK
Distribution: Debian(s) / Gentoo
Posts: 30

Rep: Reputation: 15
haha, but you can login as root ok and get:

[root@localhost ~]$



So if you look in /etc/passwd for the John user, there is an entry something like this?

john:x:500:500:john,,,:/home/john:/bin/bash

?
 
Old 11-22-2006, 03:19 PM   #6
m2azer
Member
 
Registered: Sep 2004
Location: USA
Distribution: red hat, fedora & centos
Posts: 202

Original Poster
Rep: Reputation: 30
grep -i john /etc/passwd | cut -d: -f3,5
500:

cat /etc/passwd | grep john
john:x:500:500::/home/john:/bin/bash
 
Old 11-22-2006, 03:35 PM   #7
m2azer
Member
 
Registered: Sep 2004
Location: USA
Distribution: red hat, fedora & centos
Posts: 202

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by dave_kv
haha, but you can login as root ok and get:

[root@localhost ~]$



So if you look in /etc/passwd for the John user, there is an entry something like this?

john:x:500:500:john,,,:/home/john:/bin/bash

?
haha, it still doesn't work
 
Old 11-22-2006, 03:40 PM   #8
spectra
Member
 
Registered: Nov 2006
Location: UK
Distribution: Debian(s) / Gentoo
Posts: 30

Rep: Reputation: 15
Quote:
Originally Posted by m2azer
haha, it still doesn't work
Hmmmm. Is this a fresh install? Are you using PAM for authentication locally?

Doesn't your RHEL distro have a funky automatic user creation script like adduser or superadduser??

Use your root login to tail -f /var/log/auth.log or equivalent log, then use another local terminal to try your john user and see what it says. Certainly it is quite strange.
 
Old 11-22-2006, 03:45 PM   #9
pmrent
LQ Newbie
 
Registered: May 2004
Location: Green Bay, WI
Distribution: RH 9 RHE 2.1 3.0
Posts: 27

Rep: Reputation: 15
do you have a dir in /home?

I'm thinking your home dir was deleted but you're known to /etc/passwd and shadow.

if you do have a home dir. check your ~/.bash_profile.

What does your .bash_profile look like?
 
Old 11-22-2006, 03:53 PM   #10
m2azer
Member
 
Registered: Sep 2004
Location: USA
Distribution: red hat, fedora & centos
Posts: 202

Original Poster
Rep: Reputation: 30
Well guys, I hope i could answer you questions BUT its a little bit to late - we have totally lost the system basically its dead now with " kernel panic - not syncing" error on the screen.

we found the following thread online and we ran fsck as it says it worked but it just killed the system with the above error message:

PostPosted: Wed Jul 14, 2004 6:56 pm Post subject: Re: could not open session Reply with quote
I had the same problem so I ran 'su' with strace. My problem was permissions on the /etc/passwd file. I had some filesystem corruption after two years of uptime, so fsck must have recreated the file with bad perms...

Thank you for your help
 
  


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



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

All times are GMT -5. The time now is 08:23 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