How to change root home directory
Provided that it is needed to change root user's home directory from / to /root, here is the procedure to achieve it. The /root can be switched to any other directory, as long as it is under root filesystem.
1. Edit /etc/passwd and change root's entry from:
2. Create the directory and setup the proper permissions:
# mkdir /homeroot # chmod 700 /homeroot
3. Move all the hidden files to the new home directory:
# mv /.[a-zA-Z]* /root
4. Update the Trusted System Database (TCB) if required:
5. Test if you can login properly without closing the current session.
- HP-UX 11i v3 Installation and Update Guide: HP Integrity Servers and HP 9000 Servers - Chapter 5 Cold-Installing HP-UX 11i v3
- Editor Scott Marer