How to change my group

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sanishr
    New Member
    • Aug 2008
    • 5

    How to change my group

    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.
  • Nepomuk
    Recognized Expert Specialist
    • Aug 2007
    • 3111

    #2
    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:
    Code:
    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

    Comment

    • sanishr
      New Member
      • Aug 2008
      • 5

      #3
      when I am trying to do this it is saying "Permission Denied"

      Comment

      • Nepomuk
        Recognized Expert Specialist
        • Aug 2007
        • 3111

        #4
        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

        Comment

        • wbgxx
          New Member
          • Jan 2010
          • 6

          #5
          you can do it well and you can do it badly ~!
          best wish to you~!

          Comment

          • numberwhun
            Recognized Expert Moderator Specialist
            • May 2007
            • 3467

            #6
            @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

            Comment

            Working...