[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: User Directories



On Wed, 3 Mar 1999, E.L. Meijer (Eric) wrote:

> > What do I have to do to move my user directories to a different
> > partition/drive?  I have looked around but I can not find what file (?)
> > that user info like home directory is stored.
> The home directory of a user is written in /etc/passwd.  In that file
> you can change the directory, then copy the stuff with cp -a, and remove
> the old one with rm -rf.  You may want to check
> 
> man cp
> man 5 passwd

you'd also need a -p to keep permissions.
AFAIK, though, cp -p doesn't respect symlinks and just makes duplicates,
in this case you'd want to use tar
basically a 'tar -cpf - -C homedirlocation|tar -xvpf -' but as I haven't
just tested that, you should man tar to make sure I'm right.

> and you may want to make backups.  In any case, I would not remove the
> old directory before verifying that the new setup worked.

Excellent piece of advice!

> > 	Also I was wonder what the most dependable way to mount a drive on boot
> > was?  Can you do this with in a standard '/etc/rcX.d' file or with the
> > kernel or something?  When my machine boots one of the messages that
> > comes up is 'not mounting anthing . . . ' (or something like that).  I
> > know I could do it by putting a mount /dev/hdXX in my /etc/profile file
> > but I get a feeling there is a more system smart method of doing this.
> There definitely is.  Drives that are mounted are specified in
> /etc/fstab (File System TABle).  This file too has a man page, so try
> man fstab
> If anything remains unclear, do post on this list again.  If you want
> to know more about basic unix administration tasks, you may want to
> read (buy) a book like `Running Linux' by Matt Welsh (sp?).

Or Essential System Administration by O'Reilly and Associates (my personal
favorite)

HTH

-Dano


Reply to: