Thread
:
[Debian] Running Debian in a chroot
View Single Post
fatalsaint
2008-07-30 , 17:17
Posts: 3,428 | Thanked: 2,856 times | Joined on Jul 2008
#
270
For arguments sake the users name is "joe".
The default user created currently in nit-debian is with UID/GID 1000 and I have no user with 29999 in my /etc/passwd file...
I was thinking of running something similar to removing the mount of the home directory altogether.. and running something like this:
$DEBGRP = `cat $CHROOT/etc/group | grep user: | cut -d: -f3`
find /tmp -user user -exec chgrp $DEBGRP {}\;
find /tmp -type f -user user -exec chmod g+rw {}\;
find /tmp -type d -user user -exec chmod g+rwx {}\;
That would take all "user" owned files in maemo in the /tmp and give them group readable/writable to the "joe" group on the debian side.
The problem I think in mount /home/user over /home/$DEBUSER(joe) without changing the debian /etc/passwd file is that the user "joe" will have UID/GID 1000 (on my debian) while /home/joe will have UID/GID 29999.. so the Debian will think the the "joe" user does not have rights to his own home directory. If we don't mount over the top of /home/joe .. and give r/w permissions to whatever /tmp files necessary for him to interact with the display and dbus.. it should work...
Only downside is the inter-operability between maemo and debian.. IE if a user makes a change to XCHAT in maemo, and the home drives are linked, then the change will take effect in Debian if the user launches xchat.. as an example..
The other option is to change the nit-debian installer to manually set the UID/GID on user creation.. and create the user with UID/GID 29999 .. this way they will match on maemo and debian and no tricks will be necessary for the user to read/write home and /tmp files.
__________________
If I've helped you or you use any of my packages feel free to help me
out
.
-----------------------------------------------------------------------------------
Maintaining:
pyRadio
- Pandora Radio on your N900, N810 or N800!
Last edited by fatalsaint; 2008-07-30 at
17:21
.
Quote & Reply
|
fatalsaint
View Public Profile
Send a private message to fatalsaint
Find all posts by fatalsaint