- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Move root .profile to /root/home
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-24-2001 11:37 AM
12-24-2001 11:37 AM
I would do this
by creating a directory /root/home and
changing field 6 of root's entry in /etc/passwd. Then I would move .profile over to /root/home
/root/home would be on the / filesystem, so
it would be available on a limited boot system.
Do I move my other dot files, like:
.ICEauthority
.TTauthority
.Xauthority
.dt
.dtprofile
.elm
.gpmhp-machinename
.hh
.kshrc
.mailrc
.netscape
.plan
.q4rc.pl
.sh_history
.sw .unishared
.ustk_root
????
Is it worth it?
What are advantages/disadvantages?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-24-2001 11:44 AM
12-24-2001 11:44 AM
Re: Move root .profile to /root/home
# cd /
# mkdir /root/home
Can I assume this is on the / filesystem?
what permissions should be on /root and
/root/home directories?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-24-2001 11:54 AM
12-24-2001 11:54 AM
Re: Move root .profile to /root/home
This is a great idea to do, most people now do this to take advantage of the added security you have.
Typically we set the permissions on this directory to be 750.
Good luck to you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-24-2001 12:56 PM
12-24-2001 12:56 PM
SolutionNow move all ordinary files to root's new home. Note that dotfiles (files that start with .) will need to specified as:
mv /.??* /root
Note the special .??* to exclude .. (which exists even in /) to prevent moving /../ files and directories.
Now move the rest of the files to root's $HOME. iOrdinary files never belong in the / directory. Use this to find all non-directories:
ll / | grep -v ^d
This finds ordinary files, device files, pipes, all sorts of root 'droppings'. Be sure to leave the two symlinks for /bin and /lib if present.
Making root's $HOME more secure is very important. The / directory is the most vulnerable directory there is, especially when it is root's $HOME. Many sysadmins will tell you about the famous "rm -rf *" Club. When root's $HOME is moved to /root, the worst that you might do by accident is to remove a few local files (which are of course, regularly backed up).
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-25-2001 09:52 AM
12-25-2001 09:52 AM
Re: Move root .profile to /root/home
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-25-2001 05:07 PM
12-25-2001 05:07 PM
Re: Move root .profile to /root/home
If you change /etc/passwd and move all the '.*' files to root's new home (in your case /root/home, but I'd use just /root), everything should be just fine.
I normally do this to avoid problems and trigger happy people using the 'rm' command. :)
Regards,
Paga
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-25-2001 06:52 PM
12-25-2001 06:52 PM
Re: Move root .profile to /root/home
Yes, it is a good security move to have root homedirectory as a separate directory other than / . /root should be fine.
To answer your question:
/root will be a part of / filesystem, since
you are just creating a directory. To confirm it, go to
# cd /root (or cd /root/home as per the directory) and do
#bdf . (i.e dot)
It gives the filesystem of the existing directory entry, which should be / .
AS for copying files, the basic things needed are .profile, .execrc, .kshrc and
.dtprofile. But, note that it is not advisable
to login directly as root. Use SUDO or SU
command to login to root after logging in with a regular userid.
HTH
raj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-25-2001 07:31 PM
12-25-2001 07:31 PM
Re: Move root .profile to /root/home
One other security implementation is to make use of chroot to create a "dummy" / filesystem.
When an intruder logs on as root, he will see a dummy configuration files in /etc such as /etc/passwd file etc.
A trapdoor needs to be created for you to access the real /. That must not be easily accessible by an intruder.
Hope this helps. Regards.
Steven Sim Kok Leong
Brainbench MVP for Unix Admin
http://www.brainbench.com