Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

is there a way to set up user aliases in unix such that if you have a user, my_user, they can log in with an alternate username, i.e. my_user_alternate and still be logged in as my_user?

share|improve this question
What are you trying to accomplish? – Dennis Williamson Jan 14 '10 at 15:48
up vote 12 down vote accepted

Yes, create the new user and set its UID to be the same as the other one.

This is commonly used to create "alternate" root logins.

share|improve this answer

You can do this by adding a new user with the same user id (uid) as the one you want as an alternative.


useradd -o -u 1001 my_user_alternate

It's the -o option that allows you to have the same uid. (Assuming that the user you want to 'copy' has a uid of 1020)

share|improve this answer
I'd also add -g 1001 just to be safe and verbose. – Carl Bennett Apr 28 '15 at 19:30

protected by Tom O'Connor Aug 27 '13 at 10:20

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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