- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Change root home directory
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
08-05-2004 04:54 PM
08-05-2004 04:54 PM
Pls help.
I have this line on my /etc/passwd :
root:*:0:3::/:/sbin/sh
How can I change the root home directory "/" to "/root" using command line without editing /etc/passwd using vi editor or vipw?
Pls help. High core will be given.
Thanks and Best Regards,
Negara
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2004 05:03 PM
08-05-2004 05:03 PM
SolutionDo the following:
# mkdir /root
# chmod 700 /root
Edit /etc/passwd file and change / to /root (use vipw command to edit /etc/passwd)
# vipw
# mv /.profile /root/.profile
Move any other files that belong in root's home directory to new home directory.
If trusted system run:
# pwconv
I'd also advise keeping an extra session logged into root just to ensure there is no problems.
Cheers
Con
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2004 05:09 PM
08-05-2004 05:09 PM
Re: Change root home directory
SAM
--> Accounts for Users and Groups
--> Users
--> Highlight root
--> Action menu
--> Modify
--> Make changes on 'Home Directory' to /root
--> OK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2004 05:10 PM
08-05-2004 05:10 PM
Re: Change root home directory
usemod -d /root root
Ensure that /etc/securetty has entry console, so that in case of any issue you can login using console.
sks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2004 05:11 PM
08-05-2004 05:11 PM
Re: Change root home directory
The rest of the process has been identified by Con.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2004 06:14 PM
08-05-2004 06:14 PM
Re: Change root home directory
Thanks for all comments. I decided to use vipw to edit /etc/passwd.
Thanks again.
Best Regards,
Negara