newgrp root asks for password i dont have
if i wanted to add group root as my primary group (this is prob bad practice im guessing)
and i use: newgrp root it asks me for a password nor mine or root work...why is this? |
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? |
newgrp is for changing what your current active group is, but you must be in that group or know the password already.
If you want to add yourself to a group use the usermod command. Look at the -a and -G options |
thanks for that...yes i realized my confusion...thanks for clearing it up
|
Hi,
If you want to add groups to your user, you should the usermod command instead. Read the man pages for usermod. It is quite clear. You can do all sorts of modification as well. |
Quote:
as far as using usermod command to add users to a group. use the switches like this Code:
#usermod -aG [groupName] [userName] Linux and Unix newgrp command Code:
userx@voided & ~ >> $newgrp lxdm 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. |
BW-userX "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." ??? were my other posts just as poor? or better?
anyway...i wasnt trying to make a group called root,just trying to add my user to the root group,but i understand the differences now...and the posts here,especially yours helped clear things up. in my defense the only time i get to do this stuff (the stuff i like) is pretty late after my working day...so forgive me if my brain backfires every once in a while...and to add..im not getting any younger here!!! thanks again guys,as always,your the greatest!!! |
All times are GMT -5. The time now is 11:45 AM. |