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
?
Asked
Active
Viewed 5,244 times
11

aaron
- 741
- 3
- 10
- 19
-
What are you trying to accomplish? – Dennis Williamson Jan 14 '10 at 15:48
2 Answers
13
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.

Massimo
- 70,200
- 57
- 200
- 323
10
You can do this by adding a new user with the same user id (uid) as the one you want as an alternative.
e.g.:
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)

Amandasaurus
- 31,471
- 65
- 192
- 253