Adding a user twice to Solaris OS

is it possible to add a user twice to solaris server with the same id? i have been added twice in the past week and that is messing up one application that i am using which authenticate against the os.

why(???) should this work? the uid has to be unique!

It is possible by directly editing the password file and has some use case (creating aliases with a different password). The command lines will refuse doing it though.

and what is the possible use for such aliases? different UID & passwd - same username?

Just the opposite, same uid but different username/password.

but...what for? :slight_smile: i cannot pin any practical use for such...

Let say you want to temporarily allow some user to log in under someone else account without changing that other user's password. You create an alias with a different username/password but all remaining fields identical and you tell the first user to use it. The regular user account is unaffected.

I'd think you'd want to give them more granular control that a username that has your effective UID for all commands. Using sudo to let them perform certain operations as your user under another account or using Trusted Extensions/RBAC would make more sense.

Cheers,
Keith

...assuming the software/feature is available.

It is something which can have it's uses if there is no alternative.

Agreed, but RBAC is always going to be there; most shops seem to have sudo in place as well. I tend to go at every problem from a 'give as little privilege as possible'. No reason to give a user a sledge hammer when all they need is a screw driver.

Cheers,
Keith

While I'm a strong supporter of Solaris RBAC, there are certainly cases where user account aliases better suit the needs.