You are not logged in.
So... I'm into Linux/Unix for some time, but I found something strange and I want to know if this happens only to me.
If I add a user to some group, automatically it removes the user from the other groups he belongs too.
For example, I had my username as member of audio,optic and wheel groups, but then I added it to the camera group and surprisingly I found out that I couldn't change the sound volume anymore because I wasn't in the audio group.
And here is the proof:
[root@kyle ~]# grep radu /etc/group
wheel::10:root,radu
video:x:91:radu
audio::92:radu
optical::93:hal,radu
power:x:98:radu
users::100:radu
slocate:x:21:radu
camera:x:97:radu
abs:x:102:radu
[root@kyle ~]# usermod -G bin radu
[root@kyle ~]# grep radu /etc/group
bin::1:root,bin,daemon,radu
Why does this happen? AFAIK 'usermod -G' adds the user to a group, but doesn't have to remove it from other groups.
Offline
you need to add -a
-a, --append
Add the user to the supplemental group(s). Use only with -G option.
"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍
Offline