Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

When a user is created in Linux, their username can be seen publicly in the passwd file. Is there a hash set for that?

share|improve this question
3  
Er, yes, the user name is visible publicly. You can pick a pseudonym if you like, but the name has to be unique, and will be visible to the other users. I have no idea what “is there a hash set for that” means. –  Gilles May 7 '11 at 19:48
    
Did that actually answer your question? It seemed like your main question was "Is there a hash set for that?", but I don't know what that means –  Michael Mrozek May 7 '11 at 20:24
    
If you don't want users visible you can use another user database, accessible from nsswitch. Perhaps LDAP, or database. –  Keith May 7 '11 at 20:28
    
Well, you should probably explain what you're asking then, since we're a bit confused –  Michael Mrozek May 7 '11 at 20:33
    
Please don't reply to comments, unless you have information to add. But please do what the comments request. Your questions are really not clear, and you will not get good answers, because people don't understand your questions. I recommend that you read how to ask questions, and the links on the right as well. –  Gilles May 7 '11 at 21:10

1 Answer 1

up vote 1 down vote accepted
yes, the user name is visible publicly. You can pick a pseudonym if you like, but the name has to be unique, and will be visible to the other users

In addition to what @gilles has already stated. The primary key, unique identifier of a user is the uid which is the 3rd field in the password file, or in the below example the '1000`

xenoterracide:x:1000:100::/home/xenoterracide:/bin/zsh

to create another user that's effectively the same you could add

bob:x:1000:100::/home/xenoterracide:/bin/zsh

which has the same uid therefore is the same user. So unix uses an integer (or is it a short) to denote the actual user id. No hashes are needed outside of the users password.

The password is hashed, but what type of hash is defined by pam configuration, in my case I'm using sha512.

password required        pam_unix.so sha512 shadow nullok
share|improve this answer
    
@ xenoterracide- Thanks so much.BTW,There is one man who knows my question. –  Cell-o May 8 '11 at 10:07

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.