Simpler Navigation for Servers and Operating Systems
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
Operating System - Tru64 Unix
cancel
Showing results for 
Search instead for 
Did you mean: 

Wrong username??

SOLVED
Go to solution
Charles Zepp_1
Occasional Advisor

Wrong username??

Created a new user 'user_x' and then when i log in as that user, all of the files in that directory are owned by 'user_y'. I dont think that 'user_y' exist on the server (checked /etc/passwd and dxaccounts). I also checked /etc/passwd for a duplicate UID of user_x, but none existed. Not running NIS on this server.

Any idea on what may be the culprit?

Running 5.1A.
6 REPLIES
Charles Zepp_1
Occasional Advisor

Re: Wrong username??

When I am logged in as user_x and do an id command, it returns user_y also
Michael Schulte zur Sur
Honored Contributor

Re: Wrong username??

Hi,

use ls -ln to show the numeric value of the owner of a file in the home directory. Then grep owner# /etc/passwd.

Can you post that result?

greetings,

Michael
Charles Zepp_1
Occasional Advisor

Re: Wrong username??

'ls -lan' has the following results:

. owned by 315:15
.. owned by 0:15

and all files and directories owned by 315:15

grepping /etc/passwd for 315 only returns 'user_x'
grepping 15 in /etc/group returns users

but if I do ls -la, then it shows 'user_y' to own everything.
Charles Zepp_1
Occasional Advisor

Re: Wrong username??

There is a username of 'lstepney' on the system.

/etc/passwd list this user as 629:15

but all of the new users files are owned by 'lstepn_1' (aka user_y). This user doesn't show up in /etc/passwd or dxaccounts. It looks like somehow the system is associating UID 315 with some new mysterious account called lstepn_1.
Ann Majeske
Honored Contributor
Solution

Re: Wrong username??

You may have managed to get the physical copy of your passwd database out of sync with the hashed password database (especially if you didn't use the standard tools, i.e. useradd or dxaccounts to add the user). Try running "/usr/sbin/mkpasswd /etc/passwd" to resync the physical /etc/passwd file with the hashed password database. See "man mkpasswd.8" for more info.
Charles Zepp_1
Occasional Advisor

Re: Wrong username??

That did it!! Thanks a bunch!!