Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX System Administrator's Guide: Configuration Management: HP-UX 11i Version 3 > Chapter 3 Configuring Root

Create the Root Home Directory

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

You need to use HP-UX commands, rather than HP SMH.

  1. Create a home directory for the root user. This directory must reside in the system root directory (/), since it must be available whenever the system is running. A useful directory name is /homeroot. Create it and make it accessible only by root.

    # mkdir /homeroot # chmod 700 /homeroot
  2. Modify /etc/passwd to make this new directory the home directory for the root user, as follows. The steps are shown in the example below.

    1. Use the vipw command to load /etc/passwd into vi.

    2. Insert homeroot after the / in field 6 of line 1.

    3. Identify the system in comments field 5.

    4. Save the file and exit.

    # vipw root:3ngTYOiNJA.Mc,/0WR:0:3::/:/sbin/sh                               ihomerootEsc root:3ngTYOiNJA.Mc,/0WR:0:3::/homeroot:/sbin/sh                             iMySystem Root UserEsc root:3ngTYOiNJA.Mc,/0WR:0:3:MySystem Root User:/homeroot:/sbin/sh :wq #
    IMPORTANT: Points of interest:
    • The root entry must be the first line of the /etc/passwd file.

    • The user ID in field 3 is 0.

    • Conventionally, the group ID in field 4 is 3 for group sys.

    • The system entry in field 5 can identify which root user on printouts to networked printers.

    • The absolute home directory is in field 6.

    • The login shell in field 7 must be /sbin/sh.

  3. When NIS is configured, run /var/yp/ypmake to build or synchronize the passwd maps.

  4. Move any private files into root’s home directory. For example, dot files (/.[A-zA-Z]*).

    # mv /.[A-zA-Z]* /homeroot
  5. Verify that you can log in as root or su - root from a different session. If you can’t, you still have this session to make corrections.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 2008 Hewlett-Packard Development Company, L.P.