create user like root

hello

I would like to create another user like root
With smit user, I have duplicate all the configuration from root to root2 (groupe, secondary group, administrative, etc...)
But when I connect with root2, i don't go to all directory: "permission denied !"
I don't understand where is the problem ?

thank you

Make a backup copy of your passwd in /etc.

Edit root2 to look like the following:

root:!:0:0::

apart from that edit the /etc/security/user and for the user root2 stanza

change admin=true :(for normal user its set to false)

Dare AIX team

thnak you, it's ok !

theres one more way to give a user the exact root priveldges....

the system considers a user as root only based on the uid and gid of the user...

for a root (uid=0 and gid=0)

so you can edit the /etc/passwd file and change the column where its shows the userID and the groupID of that user to 0 and 0, then that user will have all of root permissions..... :cool:

hello !

Thank you for your response
But i think that the UID is a uniq number ? we can't give the same UID for another login ?

you can change the UID, no problem... the system will think that you are root since it has uid=0...

so no problem...... :cool:

What alpha*test says is correct, but: Unix identifies users by looking up their UID/GID in /etc/passwd. Whoever comes first there will be shown as owner of files/directories, because the ownership is established not by storing the name but by storing the UID in the directories structure. Hence:

$ su - root2
# id 
uid=0(root) gid=0(system) groups=2(bin),3(sys),7(security),8(cron),10(audit),11(lp)

# touch a_file
# ls -l
total 3496
-rwxr-x---   1 root     system            0 Jan 21 2006  file_created_by_root
-rwxr-x---   2 root     system            0 Jan 21 2006  a_file

#

You see, even when yo switch to root2 you look like you are root.

bakunin

thank you for your help

Hello,

This configuration works fine but there is another problem though. If you do a ssh session to another server, the system will simply log you on as 'root' and not as the new user with root previleges. The new user however does exist on the other server and also has root previleges and the necessary SSH keys. Any ideas?

Kind regards,
Karel

I think this goes back to what was said earlier. UNIX identifies the user by the UID, not the name. So if root2 is operating under UID 0, then it will still be seen as 'root' by the receiving system (the one you SSH to).