Home Directory on External Drive

2007-03-22 Thread Masatran, R. Deepak
I want to keep my home directory on an external drive and move it between
computers as required.

1. It is asking for super-user privileges to mount it. How can I avoid this?

2. Should I place /home/masatran, or /home, on the drive?

3. How can I get it to use the external drive as my home directory during
login, for the application data, etc.?

4. I read somewhere that the external drive must be named for the links to
remain permanent. Is this correct? How do I name it?

-- 
Masatran, R. Deepak http://research.iiit.ac.in/~masatran/


pgplTR626TZqT.pgp
Description: PGP signature


Re: Home Directory on External Drive

2007-03-22 Thread Michael Pobega
On Thu, Mar 22, 2007 at 04:38:19PM +0530, Masatran, R. Deepak wrote:
 I want to keep my home directory on an external drive and move it between
 computers as required.
 
 1. It is asking for super-user privileges to mount it. How can I avoid this?
 

Make sure you have it set to user in your fstab.

# /etc/fstab: static file system information.
#
# file system mount point   type  options   dump  pass
proc/proc   procdefaults0   0
/dev/sda1   /   ext3defaults,errors=remount-ro 0
1
/dev/sda3   /home   ext3defaults0   2
/dev/sda2   noneswapsw  0   0
/dev/scd0   /mnt/cdrom   udf,iso9660 user,noauto 0   0
/dev/sdb1   /mnt/usbvfatuser,noauto 0   0

noauto is for drives that you don't want automatically mounted, like
CDs and thumb drives.


 2. Should I place /home/masatran, or /home, on the drive?
 

The drive's / is /home. So the folders on the drive (As far as I know)
should be your home folders, for example the drive if mounted as root
would look like:

[EMAIL PROTECTED]:~$ ls /
michael  pobega  masatran  mom
dad  susie   geoffrey


 3. How can I get it to use the external drive as my home directory during
 login, for the application data, etc.?


That's a bitch, because if the drive isn't connected you may run into
problems. I'm guessing though, that the external is /dev/sdb, and the
partition is 1, so you might want to add this to your /etc/fstab file:

/dev/sdb1   /home   ext3defaults

That should attempt to mount your external drive. Although personally
I would do it by UUID since it is external, and if you have a thumb
drive / multiple external drives  inserted into your computer that
could mess you up while booting.


 4. I read somewhere that the external drive must be named for the links to
 remain permanent. Is this correct? How do I name it?


That's what a UUID is for. A UUID is a specific ID that each drive
has, so that you don't have to use the device name. For example, if
you have two CD drives and they're each being picked up as /dev/scd0
and /dev/scd1, but which drive is which is alternating between boots,
you may want to use the device's UUID instead of it's /dev/* device
name. The only reason /dev/* is good is because it's human readable,
as opposed to UUIDs. But as long as you don't go overboard with your
external drives you should be fine with one or two UUIDs.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Home Directory on External Drive

2007-03-22 Thread Cédric Lucantis
 I want to keep my home directory on an external drive and move it between
 computers as required.

First, make sure that your users on the different computers have the same 
uid/gid (edit /etc/passwd and /etc/group for that).


 1. It is asking for super-user privileges to mount it. How can I avoid
 this?

Use the 'users' mount options, but mounting/unmounting your own home when 
you're logged is probably not a good idea.


 2. Should I place /home/masatran, or /home, on the drive?

This is your choice here. With /home, you'll have the homes of all your users 
on your drive (except if some have their home elsewhere, of course). You 
probably want the other choice.


 3. How can I get it to use the external drive as my home directory during
 login, for the application data, etc.?

 4. I read somewhere that the external drive must be named for the links to
 remain permanent. Is this correct? How do I name it?

Not sure I understood those two points, but you should give a label to your 
drive (if it's an ext3 filesystem, do 'e2label /dev/xxx NAME') and use an 
fstab entry like this:

LABEL=NAME  /home/masatran  ext3defaults

It will then be mounted automatically at boot time.

-- 
Cédric Lucantis



Re: Home Directory on External Drive

2007-03-22 Thread Michael Pobega
On Thu, Mar 22, 2007 at 12:26:12PM +0100, Cédric Lucantis wrote:
 
  2. Should I place /home/masatran, or /home, on the drive?
 
 This is your choice here. With /home, you'll have the homes of all your users 
 on your drive (except if some have their home elsewhere, of course). You 
 probably want the other choice.
 

If he's only going to be mounting one home directory he's better off
just mounting it as /masatran and changing his home directory to the
new directory.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Home Directory on External Drive

2007-03-22 Thread Diego Martínez Castañeda

On 3/22/07, Masatran, R. Deepak [EMAIL PROTECTED] wrote:

I want to keep my home directory on an external drive and move it between
computers as required.


I managed 8000 users in a WAN and all personal directories are stored
in a sMB server and I'm using libpam-mount to give them their home
directory.

It's highly configurable and, for your request, this words from README file:

# volume user [smb|ncp|nfs|local] server volume mount point
mount options fs key cipher fs key path

# Linux encrypted home directory examples:
# volume user local - /dev/hda123 /home/user loop,encryption=aes - -
# volume user local - /home/user.img /home/user
loop,user,exec,encryption=aes,keybits=256 - -
# volume user local - /home/user.img - - - -
# volume user local - /home/user.img - - aes-256-ecb /home/user4.key

you can crypt your home directory or not.

It's begin to work when you log in your system and end working when
you log out, so it transparent for users.

cheers,
diego

--
___Diego Martínez Castañeda
_n1mh  @ n1mh.org
___http://www.n1mh.org

Trabaja como si no necesitaras el dinero.
Ama como si nunca te hubieran herido.
Baila como si nadie te estuviera mirando.



Re: Home Directory on External Drive

2007-03-22 Thread alphadeltapapa
Here are some thoughts:

* Use LVM.  It's great, and works well with external USB drives.  It
will detect it on boot, or you can run /etc/init.d/lvm anytime to
redetect newly-connected drives.

* Consider assigning a GUID to the ext3 partition instead of a label.
Labels are certainly simpler, but a GUID is more likely to be unique
(though I'm sure you could come up with a pretty unique but still
simple label...).

* Using LVM and/or $(mount -a) and the right entries in fstab should
get you what you need.  You can mount your drive on top of /home/
whatever, and then when you umount it, you can still log in as that
user without your drive connected in case you need to do something
real quick or don't have your drive handy, just without your personal
data.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Home Directory on External Drive

2007-03-22 Thread Bob McGowan

[EMAIL PROTECTED] wrote:

Here are some thoughts:
--deleted--

* Consider assigning a GUID to the ext3 partition instead of a label.
Labels are certainly simpler, but a GUID is more likely to be unique
(though I'm sure you could come up with a pretty unique but still
simple label...).


There is a length limit on labels, 16 characters for ext2/3, according 
to the e2label command man page.


Labels are fine for disks that are fixed to one machine, use the GUID to 
be sure you have a unique value per disk/partition between multiple systems.




--deleted--


Bob


smime.p7s
Description: S/MIME Cryptographic Signature


Re: Home Directory on External Drive

2007-03-22 Thread Andrei Popescu
Michael Pobega [EMAIL PROTECTED] wrote:

 On Thu, Mar 22, 2007 at 12:26:12PM +0100, Cédric Lucantis wrote:
  
   2. Should I place /home/masatran, or /home, on the drive?
  
  This is your choice here. With /home, you'll have the homes of all
  your users on your drive (except if some have their home elsewhere,
  of course). You probably want the other choice.
  
 
 If he's only going to be mounting one home directory he's better off
 just mounting it as /masatran and changing his home directory to the
 new directory.

Why is that? IMO one should not mess with the FHS without *very* good
reason. 

Regards,
Andrei
-- 
If you can't explain it simply, you don't understand it well enough.
(Albert Einstein)