user not found but can login - linux

Hello on a linux server, I have a user ID setup, When I login it accepts the user ID and will let me login. Here is what it says after the login banner

id: cannot find name for user ID 100004
id: cannot find name for group ID 100000
id: cannot find name for user ID 100004
[I have no name!@csc06lx12 ~]$

I have my user defined in /etc/passwd and the home directory also exists.

How should I fix it...
Who is Participating?
wesly_chenConnect With a Mentor Commented:
Your UID and GID is 50070, not 100004 or 100000.

Please post your ~/.profile, ~/.bashrc and ~/.bash_profile. It might be some setting in those files which do "id".
# cat ~/.bashrc
# cat ~/.profile
# cat ~/.bash_profile
# cat /etc/issue
what's the UID and GID for that user?
# grep <username> /etc/passwd

The error message seems to me like other login mechanism, such as samba or LDAP.

Please also post
$ grep passwd /etc/nsswitch.conf
mnis2008Author Commented:
Here is the output for my ID

# grep stevep /etc/passwd
# grep passwd /etc/nsswitch.conf
#passwd:    db files nisplus nis
passwd:     files
The new generation of project management tools

With’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

mnis2008Author Commented:
Ohh my UID is 50070, I tried to post my question with another functional account credentials

# cat ~/.bashrc
# .bashrc

# User specific aliases and functions

alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'

# Source global definitions
if [ -f /etc/bashrc ]; then
        . /etc/bashrc

myUser=`who am i | awk '{ print $1 }'`
export HISTFILE=~/.sh_history.$myUser

# cat ~/.profile
cat: /root/.profile: No such file or directory

# cat ~/.bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc

# User specific environment and startup programs


export PATH
> I tried to post my question with another functional account credentials
Nothing suspicious. So those .bashrc are from that functional account?

Please post the result of the following commands (login as that account with issue)
# ls -a ~<account name>/

mnis2008Author Commented:
Chen, looks like as u indicated some of the files were missing, I restored them and now they are working..
You mean .profile is missing?
All Courses

From novice to tech pro — start learning today.