How to add a user to a group

Sometimes, when I’m working on Ubuntu or other distributions and I need to install a new program that asks me for add my user to a new group I usually go to System->Administration->Users and groups and I set my default group to the group that the program said.

But I’m not sure if this method is really the right method. For that reason, after a few hours working on Gentoo I discoverd a nice and simple way to add a user to an specific group. And you can use this for every GNU/Linux distribution.

As a root, just type:

gpasswd -a user group

That’s all. No more problems, no more “Users and groups”, no more ignorance. If you want to learn something about GNU/Linux, you should try Gentoo. It’s hard… but you’ll have fun!!.

(I needed to write it down because I always forget it)

Tags:

Tuesday, April 22nd, 2008 Links

3 Comments to How to add a user to a group

  1. It’s so simple, but many things in Linux are very simply. But, many people don’t want this, i say, they want the things easily. Try to burn a cd/dvd with many files and write this in a command line, no many people want this.

    I’m not a guru, but, when I want to use a command line instead of any program, I ask to google (jeje).

    Well that’s all (I’m sorry if my english is not complete, like you I’m learning).

  2. ax on April 26th, 2008
  3. Well, I’m not sure if I know what you mean. Anyway, command line it’s a really important thing that linux users have to know how to use it.

  4. Pau on April 27th, 2008
  5. Many thanks, that was a great help to me. I was strugglng to get VirtualBox running when I stumbled upon your site.

    Cheers!

  6. Richard on May 12th, 2008

Leave a comment