Operating System - HP-UX
1833325 Members
3077 Online
110051 Solutions
New Discussion

Re: Is it OK to move the root home directory to /root?

 
SOLVED
Go to solution
Scott Caporale_1
Occasional Contributor

Is it OK to move the root home directory to /root?

I'm thinking of moving all our root home directories to /root as in many other UNIX variants. Are there any pro's and con's to doing this?

I think it's much neater.

We are running trusted systems. Do you think this will pose a problem?
6 REPLIES 6
Michael Tully
Honored Contributor
Solution

Re: Is it OK to move the root home directory to /root?

Hi Scott,

There is no problem whatsoever. In fact it is
encouraged. Have a look at these two links.

http://people.hp.se/stevesk/bastion11.html

http://forums.itrc.hp.com/cm/QuestionAnswer/1,11866,0x4499e7e60861d511abcd0090277a778c,00.htm

HTH
-Michael
Anyone for a Mutiny ?
Deepak Extross
Honored Contributor

Re: Is it OK to move the root home directory to /root?

Scott,
Just remember to modify the /etc/passwd file correctly and move all, including hidden, files to the new $HOME.
You may need to update some of your environment-setup scripts as well.
And do open an additional session as root while you are making the change, just in case you get locked out. Close it only after you are sure you can login again.

Good Luck.
Steven Sim Kok Leong
Honored Contributor

Re: Is it OK to move the root home directory to /root?

Hi,

Not to forget that if you are running HP-UX in trusted mode, you will need to update root's TCB entry by running pwconv so as to match root's /etc/passwd entry.

Hope this helps. Regards.

Steven Sim Kok Leong
Brainbench MVP for Unix Admin
http://www.brainbench.com
Volker Borowski
Honored Contributor

Re: Is it OK to move the root home directory to /root?

Hi Scott,

in addition "/root" should be a directory on the "/"-filesystem, do not put it on a seperate filesystem.

You might be trapped, when you need to boot into single-user mode.

Volker
A. Clay Stephenson
Acclaimed Contributor

Re: Is it OK to move the root home directory to /root?

Hi Scott:

That is a very good thing as long as /root is in the / filesystem. Another good thing is to create a /root/bin directory with permissions 700. That will allow you to have a good safe place to keep root only scripts or those that are run by cron and must in-turn su to another user.

Clay
If it ain't broke, I can fix that.
Trevor Dyson
Trusted Contributor

Re: Is it OK to move the root home directory to /root?

You could also limit core dump size to stop root filling up the root filesystem if an application core dumps. Put the following in root's .profile:

ulimit -c 0
I've got a little black book with me poems in