Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Messing with uids to aid in sharing of disk.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Nicias
Guru
Guru


Joined: 06 Dec 2005
Posts: 444

PostPosted: Sat Sep 10, 2011 7:31 pm    Post subject: Messing with uids to aid in sharing of disk. Reply with quote

I have a media driver I share between two computers. One is my gentoo laptop and the other is my Mac. I have the same username on both machines, but different ids. On the Mac my uid is 501 and files are created owned by nicias : staff by default (#''s 501 : 20 ) On my laptop, I'm nicias : nicias (1000 : 1000.) This causes trouble when I attempt to access the drive from the laptop. I have to use root access to do so, and then chown the files to 501: 20 when I'm done. 501 is untake, and 20 is "dialout" whatever that is. This is a minor inconvience.

My thought is the following. I could change my uid on the gentoo box to 501, but that seems risky. Seems like that is not-real-person territory.

Another option is to create a dummy user with that uid and add myself and them to this "dialout" group (gid 50) and then set the setgid and setuid bits on the directories on the disk, the files in question are all group readable, and the directories group writable, since another user has to use them on the Mac.

Any reason why this won't work or why I shouldn't do this?
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7466

PostPosted: Sat Sep 10, 2011 10:21 pm    Post subject: Reply with quote

why don't you usermod your user to grab that uid/gid ?
look for -u & -g (-G too)

you can also pass uid/gid to the mount point
or you can higher then on your mac too.
I'm not sure, but i don't think anyone care about having a minimal value for gid/uid (except maybe 0), just that using 1000 and 100 are a convenient rule to see who is human and who is a robot/service but not an hardened need.
Back to top
View user's profile Send private message
Spidey
Apprentice
Apprentice


Joined: 07 Sep 2006
Posts: 269

PostPosted: Sun Sep 11, 2011 1:51 am    Post subject: Reply with quote

Do you actually need permissions on a removable drive?
Back to top
View user's profile Send private message
Nicias
Guru
Guru


Joined: 06 Dec 2005
Posts: 444

PostPosted: Mon Sep 12, 2011 10:11 pm    Post subject: Reply with quote

Well, I don't know. I'm mounting it with truecrypt, so until I did something else, it was mounting as root on my mac, which wasn't very helpful. I'm not sure what my other option is. It is a hfsplus volume, so it knows about unix permisions. If I don't jiggle with the uid's, don't I have to mount it as root on my gentoo machine?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum