Operating System - HP-UX
1820485 Members
2446 Online
109624 Solutions
New Discussion юеВ

Why does usermod not move home directory?

 
Brian Scarbrough
New Member

Why does usermod not move home directory?

In HP-UX 11.0 and 11.11 when using command:

usermod -d /home/user2 -m -l user2 user1

It creates a copy of /home/user1 instead of moving it to /home/user2.

The man page states it "moves" the directory, but it really just copies. Works fine in Solaris though.
2 REPLIES 2
Chris Wilshaw
Honored Contributor

Re: Why does usermod not move home directory?

According to the details on this link

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=565009

usermod wasn't desgined to do this (on HP-UX). As you say, it works on Solaris.

Checking the patch database gives no result, so it looks like it's not been patched yet (if HP have any plans to do so).
Fred Ruffet
Honored Contributor

Re: Why does usermod not move home directory?

Brian,

Agree that it's a little bit confusing. HP-UX man page tells it does so :
"-m Move the user's home directory to the directory specified with the -d option. If the home directory exists, the directory must have read and execute permission by group, where group is the primary group of the login."

Anyway, Chris is right : it doesn't. :)

Regards,

Fred

--

"Reality is just a point of view." (P. K. D.)