sudhirgoogle
asked on
Linux ID command
Hello,
I have ldap user, the user's UID value differs between two different servers, Please help me to understand why this happens.
[root@esg-dev~]# id lstarn
uid=80279(lstarn) gid=1091(web_dev) groups=1091(web_dev)
[root@linuxconsole ~]# id lstarn
uid=1(bin) gid=1(bin) groups=1(bin)
[root@linuxconsole ~]# grep lstarn /etc/passwd
[root@linuxconsole ~]# grep bin /etc/passwd
root:x:0:0:root:/root:/bin /bash
bin:x:1:1:bin:/bin:/sbin/n ologin
Both linux host esg-dev and linuxconsole are part of ldap.
I have ldap user, the user's UID value differs between two different servers, Please help me to understand why this happens.
[root@esg-dev~]# id lstarn
uid=80279(lstarn) gid=1091(web_dev) groups=1091(web_dev)
[root@linuxconsole ~]# id lstarn
uid=1(bin) gid=1(bin) groups=1(bin)
[root@linuxconsole ~]# grep lstarn /etc/passwd
[root@linuxconsole ~]# grep bin /etc/passwd
root:x:0:0:root:/root:/bin
bin:x:1:1:bin:/bin:/sbin/n
Both linux host esg-dev and linuxconsole are part of ldap.
ASKER
here is the output
[root@linuxconsole ~]# getent passwd lstarn
bin:$1$tApqDl$5/wR5/6.9YD3 l7KeKnoyc1 :1:1:bin:/ dev/null:/ sbin/nolog in
[root@linuxconsole ~]# getent passwd lstarn
bin:$1$tApqDl$5/wR5/6.9YD3
ASKER
This problem occurs only on one particular server that is 'linuxconsole" server, same id works fine on other servers.
output from working server.
getent passwd lstarn
lstarn:*:80279:1091:Lauren ce Starn:/home/lstarn:/bin/ba sh
output from working server.
getent passwd lstarn
lstarn:*:80279:1091:Lauren
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Same LDAP id is not used by local users on the server. here is the output of /etc/passwd
cat /etc/passwd
root:x:0:0:root:/root:/bin /bash
bin:x:1:1:bin:/bin:/sbin/n ologin
daemon:x:2:2:daemon:/sbin: /sbin/nolo gin
adm:x:3:4:adm:/var/adm:/sb in/nologin
lp:x:4:7:lp:/var/spool/lpd :/sbin/nol ogin
sync:x:5:0:sync:/sbin:/bin /sync
shutdown:x:6:0:shutdown:/s bin:/sbin/ shutdown
halt:x:7:0:halt:/sbin:/sbi n/halt
mail:x:8:12:mail:/var/spoo l/mail:/sb in/nologin
news:x:9:13:news:/etc/news :
uucp:x:10:14:uucp:/var/spo ol/uucp:/s bin/nologi n
operator:x:11:0:operator:/ root:/sbin /nologin
games:x:12:100:games:/usr/ games:/sbi n/nologin
gopher:x:13:30:gopher:/var /gopher:/s bin/nologi n
ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin
nobody:x:99:99:Nobody:/:/s bin/nologi n
dbus:x:81:81:System message bus:/:/sbin/nologin
vcsa:x:69:69:virtual console memory owner:/dev:/sbin/nologin
rpm:x:37:37::/var/lib/rpm: /sbin/nolo gin
haldaemon:x:68:68:HAL daemon:/:/sbin/nologin
netdump:x:34:34:Network Crash Dump user:/var/crash:/bin/bash
nscd:x:28:28:NSCD Daemon:/:/sbin/nologin
sshd:x:74:74:Privilege-sep arated SSH:/var/empty/sshd:/sbin/ nologin
rpc:x:32:32:Portmapper RPC user:/:/sbin/nologin
mailnull:x:47:47::/var/spo ol/mqueue: /sbin/nolo gin
smmsp:x:51:51::/var/spool/ mqueue:/sb in/nologin
rpcuser:x:29:29:RPC Service User:/var/lib/nfs:/sbin/no login
nfsnobody:x:65534:65534:An onymous NFS User:/var/lib/nfs:/sbin/no login
pcap:x:77:77::/var/arpwatc h:/sbin/no login
puppet:x:100:101:Puppet:/v ar/lib/pup pet:/sbin/ nologin
ntp:x:38:38::/etc/ntp:/sbi n/nologin
apache:x:48:48:Apache:/var /www:/sbin /nologin
/passwd
here is the output for linux release
[root@linuxconsole ~]# cat /etc/redhat-release
CentOS release 4.5 (Final)
here is the output for ldap packages installed.
[root@linuxconsole ~]# rpm -qa | grep ldap
nss_ldap-253-16.el4
openldap-2.2.13-12.el4_8.4
openldap-clients-2.2.13-12 .el4_8.4
[root@linuxconsole ~]#
Here is the output of nsswitch.conf file
[root@linuxconsole ~]# grep -v ^# /etc/nsswitch.conf
passwd: files ldap
shadow: files ldap
group: files ldap
hosts: files dns
bootparams: files
ethers: files
netmasks: files
networks: files
protocols: files ldap
rpc: files
services: files ldap
netgroup: files ldap
publickey: files
aliases: files
automount: files ldap
Here is the output of ldap.conf file
grep -v ^# /etc/openldap/ldap.conf
URI ldap://osdc-ldap.abc.com ldap://osdc-ldap-1.abc.com ldap://osdc-ldap-2.abc.com
BASE dc=abc,dc=com
TLS_CACERTDIR /etc/openldap/cacerts
HOST ldap://osdc-ldap.abc.com ldap://osdc-ldap-1.abc.com ldap://osdc-ldap-2.abc.com
cat /etc/passwd
root:x:0:0:root:/root:/bin
bin:x:1:1:bin:/bin:/sbin/n
daemon:x:2:2:daemon:/sbin:
adm:x:3:4:adm:/var/adm:/sb
lp:x:4:7:lp:/var/spool/lpd
sync:x:5:0:sync:/sbin:/bin
shutdown:x:6:0:shutdown:/s
halt:x:7:0:halt:/sbin:/sbi
mail:x:8:12:mail:/var/spoo
news:x:9:13:news:/etc/news
uucp:x:10:14:uucp:/var/spo
operator:x:11:0:operator:/
games:x:12:100:games:/usr/
gopher:x:13:30:gopher:/var
ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin
nobody:x:99:99:Nobody:/:/s
dbus:x:81:81:System message bus:/:/sbin/nologin
vcsa:x:69:69:virtual console memory owner:/dev:/sbin/nologin
rpm:x:37:37::/var/lib/rpm:
haldaemon:x:68:68:HAL daemon:/:/sbin/nologin
netdump:x:34:34:Network Crash Dump user:/var/crash:/bin/bash
nscd:x:28:28:NSCD Daemon:/:/sbin/nologin
sshd:x:74:74:Privilege-sep
rpc:x:32:32:Portmapper RPC user:/:/sbin/nologin
mailnull:x:47:47::/var/spo
smmsp:x:51:51::/var/spool/
rpcuser:x:29:29:RPC Service User:/var/lib/nfs:/sbin/no
nfsnobody:x:65534:65534:An
pcap:x:77:77::/var/arpwatc
puppet:x:100:101:Puppet:/v
ntp:x:38:38::/etc/ntp:/sbi
apache:x:48:48:Apache:/var
/passwd
here is the output for linux release
[root@linuxconsole ~]# cat /etc/redhat-release
CentOS release 4.5 (Final)
here is the output for ldap packages installed.
[root@linuxconsole ~]# rpm -qa | grep ldap
nss_ldap-253-16.el4
openldap-2.2.13-12.el4_8.4
openldap-clients-2.2.13-12
[root@linuxconsole ~]#
Here is the output of nsswitch.conf file
[root@linuxconsole ~]# grep -v ^# /etc/nsswitch.conf
passwd: files ldap
shadow: files ldap
group: files ldap
hosts: files dns
bootparams: files
ethers: files
netmasks: files
networks: files
protocols: files ldap
rpc: files
services: files ldap
netgroup: files ldap
publickey: files
aliases: files
automount: files ldap
Here is the output of ldap.conf file
grep -v ^# /etc/openldap/ldap.conf
URI ldap://osdc-ldap.abc.com ldap://osdc-ldap-1.abc.com
BASE dc=abc,dc=com
TLS_CACERTDIR /etc/openldap/cacerts
HOST ldap://osdc-ldap.abc.com ldap://osdc-ldap-1.abc.com
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
#getent passwd lstarn
This will give you the extact id which is being populated by LDAP
TY/SA