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...
mnis2008Asked:
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
0
 
wesly_chenCommented:
what's the UID and GID for that user?
do
# 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
0
 
mnis2008Author Commented:
Here is the output for my ID

# grep stevep /etc/passwd
stevep:x:50070:50070:stevep:/home/stevep:/bin/bash
# grep passwd /etc/nsswitch.conf
#passwd:    db files nisplus nis
passwd:     files
0
The new generation of project management tools

With monday.com’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
fi

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
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH
unset USERNAME
0
 
wesly_chenCommented:
> 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>/

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

From novice to tech pro — start learning today.