Tiny Core Linux
Tiny Core Base => TCB Q&A Forum => Topic started by: SamK on January 22, 2011, 07:52:25 AM
-
While investigating a problem of writing to a mounted samba share I came across this. It looks odd as the standard tc user appears to belong to different groups, depending upon how the question is asked.
List groups as user tc
tc@box:~$ id
uid=1001(tc) gid=50(staff) groups=50(staff),1000(audio)
List groups as user tc specifying user tc
tc@box:~$ id tc
uid=1001(tc) gid=50(staff) groups=50(staff),1000(audio)
Create a group and add user tc to the group
tc@box:~$ sudo addgroup -g 2001 testgroup
tc@box:~$ sudo addgroup tc testgroup
List groups as user tc
tc@box:~$ id
uid=1001(tc) gid=50(staff) groups=50(staff),1000(audio)
List groups as user tc specifying user tc
tc@box:~$ id tc
uid=1001(tc) gid=50(staff) groups=50(staff),1000(audio),2001(testgroup)
Is this normal and expected behaviour?
-
Probably needs to logout and login to fully refresh.
-
Probably needs to logout and login to fully refresh.
After a reboot
List groups as user tc
tc@box:~$ id
uid=1001(tc) gid=50(staff) groups=50(staff),1000(audio),2001(testgroup)
List groups as user tc specifying user tc
tc@box:~$ id tc
uid=1001(tc) gid=50(staff) groups=50(staff),1000(audio),2001(testgroup)
Prior to the reboot it was not possible to write to the Samba share, after the reboot it is.
It is preferable for this to be done without a reboot; perhaps a refresh similar to that provided by rebuildfstab might be considered for the future.
-
I'd imagine it would be enough to: (1) terminate the X server (maybe via 'Ctrl-Alt-Backspace') and (2) terminate the "original" shell and then (3) login again (e.g. as user 'tc'). Or did you try that out already?
-
Probably needs to logout and login to fully refresh.
I'd imagine it would be enough to: (1) terminate the X server (maybe via 'Ctrl-Alt-Backspace') and (2) terminate the "original" shell and then (3) login again (e.g. as user 'tc').
It does work this way, even though slightly inelegant.
-
Probably needs to logout and login to fully refresh.
Is there a way to have the id/groups update without having to logout and log back in?
-
" The set of supplementary group IDs is inherited from the parent process, and preserved across an execve(2)."
So no. If you need more groups, you should set them before the login, such as in bootsync.sh.
-
You can also include group and gshadow in your backup.