By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,806 Members | 1,337 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,806 IT Pros & Developers. It's quick & easy.

How to change my group

P: 5
I want to change my group from primary group to secondary or viceversa.

I don't have superuser access also.

could anybody please let me know how to do this.
Aug 18 '08 #1
Share this Question
Share on Google+
5 Replies

Nepomuk
Expert 2.5K+
P: 3,112
The command you're looking for is usermod. Here's the manpage online: http://linux.die.net/man/8/usermod

So, to make specialGroup your new primary Group, use:
Expand|Select|Wrap|Line Numbers
  1. usermod -g specialGroup sanishr
(or whatever your username on the computer is)

I guess, if you do it for yourself, you shouldn't have to be a superuser. (Not tested.)

Greetings,
Nepomuk
Aug 18 '08 #2

P: 5
when I am trying to do this it is saying "Permission Denied"
Aug 19 '08 #3

Nepomuk
Expert 2.5K+
P: 3,112
OK, not so good. But I may have another solution for you.

Check this page, paragraph Switching your default group: newgrp. That should allow you to work as Member of a different group until you exit the newly opened shell via exit.
Do remember however, that you'll only be using the new group as long as you don't exit the newly opened shell!

I hope that helps.

Greetings,
Nepomuk
Aug 19 '08 #4

wbgxx
P: 6
you can do it well and you can do it badly ~!
best wish to you~!
Jan 7 '10 #5

numberwhun
Expert Mod 2.5K+
P: 3,503
@Nepomuk I hate to say it, but considering this following statement, I don't know if this will work for them either:

"This only works if you are a member of multiple groups otherwise you have no group to switch to."

Unless the OP is already a member of the other group they wish to change to, it doesn't seem to work. I actually just tried this and it failed.

If you are not part of a group, then you will need to contact an admin and get yourself added to the group you need to be a part of.

Regards,

Jeff
Jan 7 '10 #6

Post your reply

Sign in to post your reply or Sign up for a free account.