Page 1 of 1

Permissions?!#£!!$%!?!

PostPosted: Tue Feb 25, 2003 3:36 pm
by Calum
hiya, at the moment i have got debian, mandrake and desktop l/x all each on their own little ext3 partitions, but they all want to share /dev/hda6 which is /home in debian and mandrake and is /mnt/home in desktop l/x.

Now this is fine in theory. being a home partition it contains one folder for each user that exists on each system. however when i reboot into another system from the one we are in, i cannot get into my directory on /home because the user ids are different in each OS. my user id is 100, 500 and 1000 depending on which OS i am in.

how can i resolve this without having to chown every time i reboot? should i literally change the /etc/passwd file in each OS to read the same user numbers as each other or is there some other way.

PostPosted: Tue Feb 25, 2003 8:12 pm
by Void Main
Yes.

:)

You may have other problems by sharing /home across multiple OSs. For instance if you run Gnome or KDE in each OS and the versions aren't quite the same and the configuration files are different or file locations are different you could have some pretty significant problems (~/.gnome, ~/.kde, etc).

PostPosted: Thu Feb 27, 2003 4:49 am
by Calum
yes, i got round that with lycoris (kde2.2) and mandrake (kde3.0) by having the home partition as /mnt/home in lycoris and keeping a little home directory inside the lycoris partition as well.

the other OSs i will probably have are the tiniest red hat i can manage (500MB? how depressing, i will try and make it fit onto less) and a fairly small FreeBSD system to get the feel of it (sad, but my BSD was going to be about 3M and then an emergency erupted last night when i was forced to reinstall windows for a proprietary chat client my university uses and needed to claw 1.5G away from my prospective freeBSD space to put it on). FreeBSD will have it's own home partition and i will not be using kde in debian (probably i will use xfce) so no other conflicts should arise.

so how exactly is a line in /etc/passwd constructed? for example:
Arvo:x:1035:100:Arvo:/home/arvo:/bin/bash

(that's not mine, btw) in this one, what does that little x signify there after his name? and each of the two numbers there (1035 and 100) what are they for? one of them is his user ID, is the other his group ID? and then his username again, why is that on this line twice?

thanks for all your help!

PostPosted: Thu Feb 27, 2003 5:01 am
by Void Main
Calum wrote:so how exactly is a line in /etc/passwd constructed? for example:
Arvo:x:1035:100:Arvo:/home/arvo:/bin/bash

(that's not mine, btw) in this one, what does that little x signify there after his name? and each of the two numbers there (1035 and 100) what are they for? one of them is his user ID, is the other his group ID? and then his username again, why is that on this line twice?


username = Arvo
passwd = x (in /etc/shadow, used to be encrypted and placed here)
UID (userid) = 1035
GID (groupid) = 100
comment = Arvo (usually your full name, phone, etc goes here)
home = /home/arvo
loginshell = /bin/bash

$ man 5 passwd

If you look in /etc/group you will find similar entries. One of which is the group name and one is the GID number. The GID that matches your GID in the /etc/passwd file is your "primary group" (default).

$ man 5 group

And of course this wouldn't be complete without a reference to /etc/shadow:

$ man 5 shadow

If you want to do a directory listing and see the UID/GID numbers rather than the names you can use the "-n" flag ($ ls -n).

You can sort of think of user "names" and group "names" vs UID "numbers" and GID "numbers" along similar lines to DNS names vs IP addresses. The operating system and applications use the numbers under the covers and the names are just there for human readability.

PostPosted: Fri Feb 28, 2003 3:13 am
by Calum
thank you, that's made it a lot clearer to me.