“ypcat command does not list complete list of user…”
We got an issue from a customer where he said that there is a mismatch between the Number of users in his environment and the user present in the output of ypcat.
To start off with, we started collected different sets of output from the dsquery command:
The command below will populate the entries for the user as per passwd map in mapcache
C:\>dsquery * -limit 0 -filter "(&(objectClass=User)(uidnumber=*))" -attr msSFU30Name uid uidnumber gidnumber gecos unixHomeDirectory loginshell
msSFU30Name uid uidnumber gidnumber gecos unixHomeDirectory loginshell
Administrator Administrator 10000 10000 /home/Administrator /bin/sh
The command below displays user’s location in Active directory
C:\>dsquery user -samid user1
"CN=user1,CN=Users,DC=coby2003r2,DC=blr"
The command below will list the users whose Unix attribute tabs has been populated
C:\>dsquery * -filter "(&(objectClass=User)(msSFU30Name=*))" -attr msSFU30Name
msSFU30Name
Administrator
user1
We got the mapcache directory exported . Found that the passwd file ( passwd.byname) under mapcache had incorrect entry
Incorrect entry
#::14186:100::/u/builddev:/bin/csh
Actual Format:
MSSFU30Name#UID:Password:UID_number:GID_number:Gecos:home_directory:Login_shell
And all the user a/c after this incorrect entry was not getting populated.
Resolution:
Deleted the user A/c from ADUC and re migrated the users. Or
Populate the missing entries through ADUC