change home directory name
Michael Havens
bmike1 at gmail.com
Tue Apr 3 01:39:13 MST 2012
YIPEE! That was the problem! (after I figured out I put the wrong name in
the directory). I wonder why it didn;t put the address in there correctly?
On Tue, Apr 3, 2012 at 1:05 AM, Michael Havens <bmike1 at gmail.com> wrote:
> Well that didn't work.... Patricia mentioned something about the home
> directory being in /etc/passwd and that if I change the name of the
> directory I need to change it in /etc/passwd. Oh I didn't change the name.
> Well.... I investigated the file anyways and see something odd about my
> entry (bmike2:x:1000:1000:Michael Havens,,,:bmike2:/bin/bash), there is no
> directory! So I put one in there (following the other enries as an example)
> and it becomes, bmike2:x:1000:1000:Michael
> Havens,,,:/home/bmike2:/bin/bash. But I do have a question, what are all of
> the comas for after my name?
>
>
>
> On Tue, Apr 3, 2012 at 12:37 AM, Michael Havens <bmike1 at gmail.com> wrote:
>
>> boy.... I nervously entered the command into the terminal and pressed
>> enter expecting it to take at least a minute. Was I surprised when it
>> completed in 3 seconds!
>>
>>
>> yeah Michael.... this is making me very uncomfortable. I'll live with the
>> new user name and the old directory name. You know, I don't know why it ran
>> out of space! I have .33GB of free space after the copy. What is that?
>> 330MB? It shouldn't of run out of room!
>>
>>
>> On Tue, Apr 3, 2012 at 12:19 AM, Michael Havens <bmike1 at gmail.com> wrote:
>>
>>> Ahhh shucks.... you guys already told me that was going to be a problem
>>> and you gave me the solution I was asking for. Good thing I looked through
>>> the posts again. Thanks..... it looks like I'm not as smart as I thought I
>>> was. Me and my acursed memory!
>>>
>>>
>>> On Mon, Apr 2, 2012 at 11:57 PM, Michael Havens <bmike1 at gmail.com>wrote:
>>>
>>>> lovely..... because it ran out of space my old user can't log in to the
>>>> gui. I try logging in to a terminal as <new user> and it says:
>>>>
>>>> root at Michaels-PC:~# su bmike2
>>>> To run a command as administrator (user "root"), use "sudo <command>".
>>>> See "man sudo_root" for details.
>>>> bash: bmike2/.bashrc: Permission denied
>>>> bmike2 at Michaels-PC:/root$
>>>>
>>>> I just looked at /home and it seems that what happened is it changed
>>>> the user name and barfed when it was coopying the files and so it left me
>>>> with the new user name and the old directory. So please..... how do I
>>>> associate the new user name with the old directory? Would I still use
>>>> usermod
>>>> ..... Well, I figured I didn't have anything to lose by trying it and I
>>>> found out that didn't work. Because the user was changed while the previous
>>>> command was in process user bmike1 doesn't exist.... I bet I know what's
>>>> going on!everything is owned by user bmike1 (who doesn't exist anymore) so
>>>> when bmike2 tried to access .bashrc it said 'nope'. So I think I figured
>>>> out the problem! (this is exciting)(I'll be a regular computer wizard
>>>> soon!) If what I think is the problem is is correct the solution would be
>>>> 'find -r /home/bmike1 * | chown bmike2'. Would this work? Are there
>>>> programs not owned by the user in it's directory? What about them (if there
>>>> are)?
>>>>
>>>>
>>>> On Mon, Apr 2, 2012 at 2:34 PM, Michael Havens <bmike1 at gmail.com>wrote:
>>>>
>>>>> Well, I guess I don't really need to change the directory's name. So I
>>>>> suppose just
>>>>>
>>>>> 'usermod -l <newuser> <old user>'
>>>>>
>>>>>
>>>>> On Mon, Apr 2, 2012 at 2:23 PM, Michael Butash <michael at butash.net>wrote:
>>>>>
>>>>>> Add some? :)
>>>>>>
>>>>>> Actually it sounds like it's "copying, then deleting" (safe) vs.
>>>>>> "moving", so if you're short diskspace, you'll need to just move it, change
>>>>>> your /etc/passwd and group file for the user/uid, and chown -r the
>>>>>> directory to the new username/uid.
>>>>>>
>>>>>> Matrix's method presumes you have temp disk space, but looks like
>>>>>> you're doing it the hard way manipulating ownerships and such from root
>>>>>> user.
>>>>>>
>>>>>> -mb
>>>>>>
>>>>>>
>>>>>>
>>>>>> On 04/02/2012 02:09 PM, Michael Havens wrote:
>>>>>>
>>>>>>> hmmmmm. It just ran out of disk space. Any suggestions on what I can
>>>>>>> do
>>>>>>> about that?
>>>>>>>
>>>>>>> On Mon, Apr 2, 2012 at 1:58 PM, Michael Havens <bmike1 at gmail.com
>>>>>>> <mailto:bmike1 at gmail.com>> wrote:
>>>>>>>
>>>>>>> thanks for explainig the rationale of putting the old user name
>>>>>>> last.
>>>>>>>
>>>>>>>
>>>>>>> On Mon, Apr 2, 2012 at 1:33 PM, Matrix Mole <matrixm at gmail.com
>>>>>>> <mailto:matrixm at gmail.com>> wrote:
>>>>>>>
>>>>>>> If the account you are trying to change is your current
>>>>>>> account,
>>>>>>> it may be easier to login as root to make the changes (just to
>>>>>>> prevent any existing programs in memory trying to use the old
>>>>>>> username/directory). I'd also use the command as follows:
>>>>>>>
>>>>>>> usermod -l <newuser> -md <newuser> <olduser>
>>>>>>>
>>>>>>> since an existing username needs to be at the end (so the
>>>>>>> command knows what user account to modify).
>>>>>>>
>>>>>>>
>>>>>>> On Mon, Apr 2, 2012 at 1:26 PM, Michael Havens <
>>>>>>> bmike1 at gmail.com
>>>>>>> <mailto:bmike1 at gmail.com>> wrote:
>>>>>>>
>>>>>>> I'll use usermod then. Thanks for letting me know about
>>>>>>> it.
>>>>>>> so I think this is the proper syntax. Will this work?
>>>>>>>
>>>>>>> sudo usermod -l <olduser> <newuser> -dm <newuser>
>>>>>>>
>>>>>>>
>>>>>>> On Mon, Apr 2, 2012 at 1:13 PM, Matrix Mole
>>>>>>> <matrixm at gmail.com <mailto:matrixm at gmail.com>> wrote:
>>>>>>>
>>>>>>> If you are changing your username, there is flags to
>>>>>>> the
>>>>>>> usermod command that can help change the home
>>>>>>> directory.
>>>>>>> The -d flag to usermod will update /etc/passwd with
>>>>>>> the
>>>>>>> users home directory, and the -m flag will move the
>>>>>>> old
>>>>>>> directory to the new name. I'm pretty sure that
>>>>>>> usermod
>>>>>>> will also take care of the ownership issues as well.
>>>>>>> Check 'man usermod' for more details on this. If you
>>>>>>> don't use the usermod command, then there is also the
>>>>>>> ownership issue to consider with changing home
>>>>>>> directory. The chown command can help make sure the
>>>>>>> directory is owned by the correct user with 'chown -R
>>>>>>> {username} [homedir]' command.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Mon, Apr 2, 2012 at 1:00 PM, Michael Havens
>>>>>>> <bmike1 at gmail.com <mailto:bmike1 at gmail.com>> wrote:
>>>>>>>
>>>>>>> Thanks. Is that the only thing I have to worry
>>>>>>> about?
>>>>>>>
>>>>>>>
>>>>>>> On Mon, Apr 2, 2012 at 12:57 PM, Patricia Wilson
>>>>>>> <wilson.pr.gm at gmail.com
>>>>>>> <mailto:wilson.pr.gm at gmail.com**>> wrote:
>>>>>>>
>>>>>>> Note that your home directory name appears in
>>>>>>> the /etc/passwd file so the system knows where
>>>>>>> you "live" when you login. If you change the
>>>>>>> name of that directory you need to change your
>>>>>>> entry in the passwd file to match.
>>>>>>>
>>>>>>> On Mon, Apr 2, 2012 at 12:17 PM, Michael
>>>>>>> Havens
>>>>>>> <bmike1 at gmail.com <mailto:bmike1 at gmail.com>>
>>>>>>> wrote:
>>>>>>>
>>>>>>> How would I accomplish this? Is it as easy
>>>>>>> as just moving the old name to the new
>>>>>>> name;
>>>>>>> or should I do a 'find -r / <old
>>>>>>> directory>|mv - <newdirectory'?
>>>>>>>
>>>>>>> --
>>>>>>> :-)~MIKE~(-:
>>>>>>>
>>>>>>> ------------------------------**
>>>>>>> ---------------------
>>>>>>> PLUG-discuss mailing list -
>>>>>>> PLUG-discuss at lists.plug.**phoenix.az.us<PLUG-discuss at lists.plug.phoenix.az.us>
>>>>>>> <mailto:PLUG-discuss at lists.**
>>>>>>> plug.phoenix.az.us <PLUG-discuss at lists.plug.phoenix.az.us>>
>>>>>>>
>>>>>>> To subscribe, unsubscribe, or to change
>>>>>>> your
>>>>>>> mail settings:
>>>>>>> http://lists.PLUG.phoenix.az.**
>>>>>>> us/mailman/listinfo/plug-**discuss<http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Sent from my super hot-shot dual core 64 bit
>>>>>>> Gateway running Ubuntu 11 from the
>>>>>>> chrome/teakwood/glass desktop in my Luxo
>>>>>>> Scottsdale condo.
>>>>>>>
>>>>>>> Patricia Wilson
>>>>>>> Apache Junction, AZ
>>>>>>> Member NRA, ARRL
>>>>>>> WB8DXX
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> ------------------------------**
>>>>>>> ---------------------
>>>>>>> PLUG-discuss mailing list -
>>>>>>> PLUG-discuss at lists.plug.**phoenix.az.us<PLUG-discuss at lists.plug.phoenix.az.us>
>>>>>>> <mailto:PLUG-discuss at lists.**
>>>>>>> plug.phoenix.az.us <PLUG-discuss at lists.plug.phoenix.az.us>>
>>>>>>>
>>>>>>> To subscribe, unsubscribe, or to change your
>>>>>>> mail settings:
>>>>>>> http://lists.PLUG.phoenix.az.**
>>>>>>> us/mailman/listinfo/plug-**discuss<http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> :-)~MIKE~(-:
>>>>>>>
>>>>>>> ------------------------------**
>>>>>>> ---------------------
>>>>>>> PLUG-discuss mailing list -
>>>>>>> PLUG-discuss at lists.plug.**phoenix.az.us<PLUG-discuss at lists.plug.phoenix.az.us>
>>>>>>> <mailto:PLUG-discuss at lists.**plug.phoenix.az.us<PLUG-discuss at lists.plug.phoenix.az.us>
>>>>>>> >
>>>>>>>
>>>>>>> To subscribe, unsubscribe, or to change your mail
>>>>>>> settings:
>>>>>>> http://lists.PLUG.phoenix.az.**
>>>>>>> us/mailman/listinfo/plug-**discuss<http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> ------------------------------**---------------------
>>>>>>> PLUG-discuss mailing list -
>>>>>>> PLUG-discuss at lists.plug.**phoenix.az.us<PLUG-discuss at lists.plug.phoenix.az.us>
>>>>>>> <mailto:PLUG-discuss at lists.**plug.phoenix.az.us<PLUG-discuss at lists.plug.phoenix.az.us>
>>>>>>> >
>>>>>>>
>>>>>>> To subscribe, unsubscribe, or to change your mail
>>>>>>> settings:
>>>>>>> http://lists.PLUG.phoenix.az.**
>>>>>>> us/mailman/listinfo/plug-**discuss<http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> :-)~MIKE~(-:
>>>>>>>
>>>>>>> ------------------------------**---------------------
>>>>>>> PLUG-discuss mailing list -
>>>>>>> PLUG-discuss at lists.plug.**phoenix.az.us<PLUG-discuss at lists.plug.phoenix.az.us>
>>>>>>> <mailto:PLUG-discuss at lists.**plug.phoenix.az.us<PLUG-discuss at lists.plug.phoenix.az.us>
>>>>>>> >
>>>>>>>
>>>>>>> To subscribe, unsubscribe, or to change your mail
>>>>>>> settings:
>>>>>>> http://lists.PLUG.phoenix.az.**us/mailman/listinfo/plug-*
>>>>>>> *discuss<http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> ------------------------------**---------------------
>>>>>>> PLUG-discuss mailing list -
>>>>>>> PLUG-discuss at lists.plug.**phoenix.az.us<PLUG-discuss at lists.plug.phoenix.az.us>
>>>>>>> <mailto:PLUG-discuss at lists.**plug.phoenix.az.us<PLUG-discuss at lists.plug.phoenix.az.us>
>>>>>>> >
>>>>>>>
>>>>>>> To subscribe, unsubscribe, or to change your mail settings:
>>>>>>> http://lists.PLUG.phoenix.az.**us/mailman/listinfo/plug-**
>>>>>>> discuss<http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> :-)~MIKE~(-:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> :-)~MIKE~(-:
>>>>>>>
>>>>>>>
>>>>>>> ------------------------------**---------------------
>>>>>>> PLUG-discuss mailing list - PLUG-discuss at lists.plug.**phoenix.az.us<PLUG-discuss at lists.plug.phoenix.az.us>
>>>>>>> To subscribe, unsubscribe, or to change your mail settings:
>>>>>>> http://lists.PLUG.phoenix.az.**us/mailman/listinfo/plug-**discuss<http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss>
>>>>>>>
>>>>>> ------------------------------**---------------------
>>>>>> PLUG-discuss mailing list - PLUG-discuss at lists.plug.**phoenix.az.us<PLUG-discuss at lists.plug.phoenix.az.us>
>>>>>> To subscribe, unsubscribe, or to change your mail settings:
>>>>>> http://lists.PLUG.phoenix.az.**us/mailman/listinfo/plug-**discuss<http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> :-)~MIKE~(-:
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> :-)~MIKE~(-:
>>>>
>>>
>>>
>>>
>>> --
>>> :-)~MIKE~(-:
>>>
>>
>>
>>
>> --
>> :-)~MIKE~(-:
>>
>
>
>
> --
> :-)~MIKE~(-:
>
--
:-)~MIKE~(-:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.PLUG.phoenix.az.us/pipermail/plug-discuss/attachments/20120403/3e2fa806/attachment.html>
More information about the PLUG-discuss
mailing list