LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   user command problem !!! (https://www.linuxquestions.org/questions/linux-newbie-8/user-command-problem-664760/)

shipon_97 08-23-2008 01:53 AM

user command problem !!!
 
Dear Friends ,

Can u plz give me the following answer :

1)

In the following example :
[root@rptsvr ~]# groups paul
paul : alice sysadmin

In the above example How can I understand , what is the primary group and secondary group of the user 'PAUL'.


2)

If I make a change like following :

"usermod -G mygroup paul"

Then now, how can i undo this change ?

tungvs 08-23-2008 04:11 AM

1. In my opinion, the first one is the initial group (primary group, as you say)
2. No idea. I think you have to use "usermod -G <group_list> paul" once more time.

Samotnik 08-23-2008 05:01 AM

1. Primary group for user paul is always paul. alice and sysadmin are supplementary groups.
2. By douing this you deleted user paul from alice and sysadmin groups, and added it to mygroup group. Linux don't remember your previous status, so you're not able to simply undo change - you should assign an old grouplist to user paul by hands.

tungvs 08-24-2008 04:03 AM

Quote:

Originally Posted by Samotnik (Post 3256876)
1. Primary group for user paul is always paul. alice and sysadmin are supplementary groups.

It's not "always", indeed. You can change paul's primary group by using "usermod -g <primary_group> paul"


All times are GMT -5. The time now is 05:36 AM.