How to create multiple IDs with same UID in AIX ?

How to change UID of IDs in AIX ?

1 Answer 1


You cannot.

The (eventual) mkuser command will not create IDs with the same UID. Quoting the mkuser man page:


ID collision detection in the target registry is always enforced regardless of the dist_uniqid system attribute.

Using either smitty or the command-line will land you in the same situation.

As for changing a user's UID, you would use the chuser command or smitty (which then calls chuser), but it uses the same restriction as mkuser does:

However, when the ID is changed using the chuser command, ID collision checking is also controlled by the dist_uniqid attribute in the usw stanza of the /etc/security/login.cfg file. The behavior of ID collision control is the same as that described for the mkuser command.

For extra fun, check out the command that smitty runs during a User change (smitty chuser):

   x() {
     if [ $# -ge 2 ]                                                        
       for i in "$@"
         spam="$spam \"$i\""
       eval chuser $spam
   x id='1234' username
  • That code is... not good. Why not just chuser "$@"? Or does it rely on spam not getting reset?
    – Kusalananda
    Jul 12, 2018 at 19:52
  • @K That structure is one that a lot of smitty menus use, so I suspect the author copy/pasted a different one and replaced the guts for the chuser flags, none of which need any special handling. The smitty menu generates that code based on user input in the menu. It does at least quote the data going into it (twice), but I was amused at the author's choice for the variable's name.
    – Jeff Schaller
    Jul 12, 2018 at 20:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .