- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Failed to Change 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
Discussions
Discussions
Forums
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
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
тАО07-13-2001 04:47 AM
тАО07-13-2001 04:47 AM
Failed to Change root's Home
this should be an easy one.
I don't want the root directory i.e. / to be the root account's home.
Thus I created a directory /root which resides in the same filesystem as the root LV (i.e. no submount).
When I issue usermod this happens:
# ls -ld /root
drwx------ 2 root sys 96 Jul 11 15:30 /root
# awk -F: '$3==0 {print $(NF-1)}' /etc/passwd
/
# useradd -D
GROUPID 20
BASEDIR /home
SKEL /etc/skel
SHELL /sbin/sh
INACTIVE -1
EXPIRE
# usermod -d /root root
'/root' is not a valid directory
Is this only changeable for the root account in single user mode?
Or could I use the "vipw" command and edit the home field directly?
Finally, the mount of the Root FS looks strange:
# bdf /
Filesystem kbytes used avail %used Mounted on
/dev/root 143360 31507 104874 23% /
# grep ' / ' /etc/fstab
/dev/vg00/lvol3 / vxfs delaylog 0 1
# lvlnboot -v|grep -i root
Physical Volumes belonging in Root Volume Group:
Root: lvol3 on: /dev/dsk/c1t2d0
# grep ' / ' /etc/mnttab
/dev/root / vxfs log 0 0 994940210
Why didn't init mount the /dev/vg00/lvol3 instead of /dev/root.
The latter looks quite strange to me.
Regards
Ralph
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-13-2001 05:12 AM
тАО07-13-2001 05:12 AM
Re: Failed to Change root's Home
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-13-2001 05:14 AM
тАО07-13-2001 05:14 AM
Re: Failed to Change root's Home
vipw works fine ... just change / to /root, but check the permissions. Why don't you just use SAM to change the home-directory ... you can't change the login name nor UID, but the homedir is no prob ...
Cheers
Oli
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-13-2001 05:14 AM
тАО07-13-2001 05:14 AM
Re: Failed to Change root's Home
To get / mounted correctly:
mv /etc/mnttab /etc/mnttab.old
mount -a
This will not affect any of your mounted file system, but will correct the error.
Changeing root's homedir: I'd just use vipw and change the directory to /root. One thing I would consider though is that one of the reasons for changeing roots homedir is so you don't fill up / inadvertently. I would consider putting root's homedir as /home/root. That way if you do something silly and create a huge file, you fill up /home, but not /. Filling home may not be good, but I'd rather it be /home at 100% than /.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-13-2001 05:16 AM
тАО07-13-2001 05:16 AM
Re: Failed to Change root's Home
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-13-2001 05:21 AM
тАО07-13-2001 05:21 AM
Re: Failed to Change root's Home
rm /etc/mnttab
mount
mount with no args rebuilds mnttab.
Robin.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-16-2001 12:06 AM
тАО07-16-2001 12:06 AM
Re: Failed to Change root's Home
Sorry, for the mispost in databases.
I meant to post this in administration but there must have been some stale hidden field still lingering when I hit the submit button.
Actually, I knew that as root I would always be able to make changes to /etc/passwd but usually there's more involved behind the scenes than just changing one field.
That's why I prefer to run the usermod command on SysV Unices.
For instance on Solaris or Linux with an /etc/shadow you would also have to issue a pwconv.
But since we don't run a secure system in that respect a mere vipw will probably do the job.
With regard to my strange / mount.
Patrick, I clobbered the mount table
(i.e. >/etc/mnttab), and ran a mount, which rebuilt it, but exactly same as before.
Even a temporary renaming didn't help.
Will I have to reboot (or change runlevel) first in order to get it fixed?
Because I'm not familiar with the /dev/root device I have a sneaking suspicion that my mirrored /dev/vg00/lvol3 may not be kept in sync as long as it doesn't appear in /etc/mnttab.
I hope I'm wrong in this respect.