Changing home directory

Mattia Gandolfi mgandolf at redhat.com
Fri Nov 24 11:54:15 UTC 2006


Joachim Backes wrote:
> Mattia Gandolfi wrote:
>> arora.himanshu at gmail.com wrote:
>>> Hi,
>>>            I want to change my home directory from /home/me to 
>>> /tmp/me without getting root involved. It also means that whether I 
>>> do ssh or scp or ftp or telnet it should see my home directory as 
>>> /tmp/me. Any suggestions ?
>>>
>>> Thanks,
>>>
>>
>> usermod -dm /tmp/me <your_username>
> 
> You are sure? The manpage says:
> 
> CAVEATS
>        usermod will not allow you to change the name of a user who is 
> logged in.
> 
> How to do it without logging in (as root or user)?

it can only be done logging in as root (or as a user belonging to root 
group).
It can't be done logging is as the user itself (as the manpage correctly 
says), or as another user (which obviously would not have the permission 
to do so).

I see no way to do it without logging in at all... you could modify 
/etc/passwd and "push" it to the machine using wathever you want (scp 
for example), but this means logging in anyway)

Cheers

Mattia

-- 
Mattia Gandolfi
Global Professional Services
Red Hat Italia
http://www.redhat.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mgandolf.vcf
Type: text/x-vcard
Size: 324 bytes
Desc: not available
Url : http://lists.fedoraproject.org/pipermail/users/attachments/20061124/fb8194fc/attachment-0002.vcf 


More information about the users mailing list