How to properly re-establish users after a reinstall?

Lisa Kachold lisakachold at obnosis.com
Mon Apr 20 19:53:19 MST 2009


Looks like your /home partition was being equated as /hda7 - which makes sense.

umount /dev/hda7
mkdir /home
mount -t ext3 (or whatever it is) /dev/hda7 /home
df -k
vi /etc/passwd
ls -al ~joe
ls -al ~pattie


You can change the mount point via /etc/fstab
You can change the users home via /etc/passwd
Be sure to chown/chgrp all the files to their corresponding users

cd ~joe | chown -R joe:joe *
cd ~pattie | chown -R pattie:pattie *

On 4/20/09, Josef Lowder <joe at actionline.com> wrote:
> Thanks Craig.  I can't imagine how this could have come about
> as I know that hda7 was originally specified as just "/home"
>
> But I really appreciate your response and guidance.
>
> On 4/20/09, Craig White <craigwhite at azapple.com> wrote:
>>  it appears that you have mounted /dev/hda7 as /home/joe rather than
>>  just /home
>>
>>  if you haven't created anything else (i.e., users, in /home, you could
>>  probably just change the mount point in /etc/fstab and
>>  'umount /home/joe' and 'mount -a' and everything would be fixed. You
>>  would of course want users named joe and patti and if you haven't
>>  already created them, you could figure out which uid number they had
>>  previously...
>>
>>  ls -ldn /home/joe/*
>>
>>  and their user & group numbers from your old system should be displayed.
>>
>>  Then you could create them again with a 'useradd' command like,
>>
>>  useradd -u 501(or ??) -g 501(or ??)
>>
>>  type 'useradd --help' for information.
>>
>>  Craig
>>
>>
>>  --
>>  This message has been scanned for viruses and
>>  dangerous content by MailScanner, and is
>>  believed to be clean.
>>
>>  ---------------------------------------------------
>>  PLUG-discuss mailing list - 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
>>
>>
> ---------------------------------------------------
> PLUG-discuss mailing list - 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
>


-- 
www.obnosis.com (503)754-4452
"Contradictions do not exist." A. Rand


More information about the PLUG-discuss mailing list