Making a Second Root User


Contents

About This Document
Creating a Second Root User
Creating Special Users with root Authority

About This Document

This document explains how to create a second root user and is applicable to AIX Versions 3.2 and 4.x.


Creating a Second Root User

The only way to create a second root user is to create a user and manually edit the user ID field and group ID field in the /etc/passwd file and change the user ID to ID 0. For a typical user ID, for example, change the entry from:

   russ:!:206:1::/u/russ:/bin/ksh 
to
   russ:!:0:0::/u/russ:/bin/ksh 

This creates a user (in this case, "russ") with identical permissions to root.


Creating Special Users with root Authority

You can also create special users that have root authority but can only execute one command. For instance, to create a user that can only reboot the system, create a regular user called shutdown and modify the /etc/passwd command to change the user and group ID to 0. For example, in AIX 3.2:

   shutdown:!:0:0::/u/shutdown:/bin/ksh 

Change the initial program from /bin/ksh to /etc/shutdown -Fr:

   shutdown:!:0:0::/u/shutdown:/etc/shutdown -Fr 

For AIX 4, the /etc/passwd entry for "shutdown" should be:

   shutdown:!:0:0::/u/shutdown:/usr/sbin/shutdown -Fr 
The shutdown command on AIX Version 4.1 is located in /usr/sbin.

Now when user "shutdown" logs in, the system will shut down and reboot.


Making a Second Root User: secondroot.user.all.cmd ITEM: FAX
Dated: 99/05/21~00:00 Category: cmd
This HTML file was generated 99/06/24~12:42:04
Comments or suggestions?
Contact us