- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- changing root's 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
10-04-2004 02:52 AM
10-04-2004 02:52 AM
Can I do this 'on the fly' without troubles, or do I need a reboot, etc?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2004 02:56 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2004 02:56 AM
10-04-2004 02:56 AM
Re: changing root's home
Yes you can if it is also mounted in /
copy .???* files to roots new home dir.
vipw to add the passwd file
and log in again.
Regards,
Gideon
PS mind the right on roots home dir ( .ssh etc.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2004 02:57 AM
10-04-2004 02:57 AM
Re: changing root's home
I can't imagine why you couldn't do it on the fly. You will eventually want to make sure you can reboot and log in and all, but, for now, just go ahead and switch it and change the /etc/passwd entry.
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2004 02:57 AM
10-04-2004 02:57 AM
Re: changing root's home
You have to take care of the scripts which might be using earlier home of root. for that for now you can create a link to old root home.
Using SAM change root home.
ln -s
This should take care of scripts also which call your root home.
Then over a period of time you can change whereever you are using it.
I have practised it in my setup.
Thanks
Prashant
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2004 03:00 AM
10-04-2004 03:00 AM
Re: changing root's home
It is better to use /root. I n case you need to boot in single user mode /home is not available. Create a dir in the root name root.
drwx------ 5 root sys 1024 Sep 29 17:31 root
mv your .profile to /root
edit your profile to change settings to /root. ( like .sh_history )
HISTFILE=${HOME}/.sh_history_`who am i|awk '{ print $1}'`
change root in the passwd file to the new /root homedir.
Regards,
Robert-Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2004 03:01 AM
10-04-2004 03:01 AM
Re: changing root's home
cp -pr /root/* /homeroot
then
mv /root /rootold
ln -s /homeroot /root
This works perfectly.
Thanks
Prashant
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2004 03:01 AM
10-04-2004 03:01 AM
Re: changing root's home
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2004 03:05 AM
10-04-2004 03:05 AM
Re: changing root's home
I was thinking of /homeroot as I saw it in an HP-UX manual, someplace. If /root is more commonly used then I'll do that.
Fred
p.s. Robert-Jan, I was planning on using /homeroot, not /home/root. I agree, it should be in the root file system, not /home.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2004 03:31 AM
10-04-2004 03:31 AM
Re: changing root's home
create an new dir in / filesystem (so it is accessible from miniroot in maintenance mode)
mkdir -m 0700 /root
An easy way to move the dot files to the new home is by letting the shell glob them
cd / && mv .[!.]* /root
Change the 6th field in /etc/passwd to the new home by editing /etc/passwd with "vipw" (takes care of advisory file locking)
then logout and in again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2004 03:35 AM
10-04-2004 03:35 AM