Originally Posted by sigint-ninja
read this later on:
To be able to use the newgrp command, a user has to be a member of that group.
Alternatively, a group password can be set for the group using the gpasswd com-
mand. If a user uses the newgrp command but is not a member of the target group,
the shell prompts for the group password. After you enter the correct group pass-
word, the new effective primary group is set.
i dont understand this,"a user has to be a member of that group" isnt that the point of this command to add a member to the root group?
or is it only to set it as the primary group?...so you need to be part/member of the group you want to set as the primary group...is that right?
oh sigint-ninja I am so surprised at you, I've have read your other posts in here and you're freaking me out now. Why is your brain telling you to make a group called root, and not something else? better take a look at your sudoers file just to see what you see.
as far as using usermod command to add users to a group. use the switches like this
#usermod -aG [groupName] [userName]
is to append that group to the list of groups the user already has, the G is to tell the command it is to be dealing with Groups. if you just use the -G without the 'a'
then you will lose every group that user was assigned to in the proccess.
Linux and Unix newgrp command
userx@voided & ~ >> $newgrp lxdm
newgrp: crypt failed: Invalid argument
newgrp: permission denied
the newgrp is just the command used by a user to log into a different group that has already been established and set up properly in order to use its (that groups) privages
say if you have a group that has permissions to modify the printer setting how where and how to send stuff to get printed to one or more printers. then you assign some people to that group so they can fix it if it breaks. then one of them users all they have to do is log into that group to do so?
if a password was given to that group then they got a know it, or one of them users in that case could tell someone that is not in the group to log in and fix it, then give them the password or type it in for them and they now can have the groups premissions to do so? just by using the command newgrp [groupName]
that is what it looks like to me.