UID and different distros

If you are new to Linux or new to Sabayon Linux and just not sure where to post, here ya go. Post without fear of being told to RTFM :)

Moderator: Moderators

Post Reply
AnneW
Baby Hen
Posts: 3
Joined: Sat Jul 27, 2013 14:20

UID and different distros

Post by AnneW » Mon Jul 29, 2013 10:46

When dual-booting it is helpful to have access to files on "the other" distro, sometimes config files, more often user data. Some distros like Mageia number UIDs from 500 while others, including Sabayon, start at 1000.

I normally mount partitions in fstab. Is there some way to add an alias that allows anne(500) to be read by anne(1000)?

Anne

matuss
Baby Hen
Posts: 9
Joined: Fri Jul 19, 2013 8:36

Re: UID and different distros

Post by matuss » Mon Jul 29, 2013 14:05

First thing that comes to my mind would be to re-create user in one system, so uids will match (you can specify uid via '-u' parameter to adduser).

Other option is to add 'uid=anne' to fstab, but as far as I know, this would change owner of _all_ files on the filesystem.

manifesto
Growing Hen
Posts: 192
Joined: Mon Jul 19, 2010 22:21

Re: UID and different distros

Post by manifesto » Tue Jul 30, 2013 15:21

you should better use same id everywhere.
You choose one / user and change uid in /etc/passwd file and then change find . -uid XXXX -exec chown YYYY {} \; on others distro.

life-on-mars
Simple Hen
Posts: 83
Joined: Fri Jul 12, 2013 14:05

Re: UID and different distros

Post by life-on-mars » Thu Aug 01, 2013 11:50

You could activate acls, so both UIDs get access to your mounts.

You would have to add "acl" to your mount options in /etc/fstab, and use setfacl to add a second user to the access list of each file and directory.
sɹɐɯ uo əɟıɿ sı əɹəɥʇ -- ⠐⠮ ⠊⠎ ⠇⠊⠋⠑ ⠕⠝ ⠍⠜⠎⠖

Post Reply