DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi, i just installed VirtualBox on my Debian etch machine. It created a group named 'vboxusers'. When running VirtualBox command from a terminal so that it opens the GUI, i get a message that i am not part of that group. So, i evidently attempted to add the user to that group, using the following command: adduser -G vboxusers my_user_name
Oddly enough, i get the error message below: useradd: user ****** exists
Now, performing id 'my_user_name' in the console, i notice that the group vboxusers is not there, which means that i am not a member of that group.
Why is adduser telling me that user exists if i want to add my user to the group??
-a, --append
Add the user to the supplemental group(s). Use only with -G option.
-G, --groups GROUP1[,GROUP2,...[,GROUPN]]]
A list of supplementary groups which the user is also a member of. Each group is separated from
the next by a comma, with no intervening whitespace. The groups are subject to the same
restrictions as the group given with the -g option. If the user is currently a member of a group
which is not listed, the user will be removed from the group. This behaviour can be changed via -a
option, which appends user to the current supplementary group list.
That's exactly what i read in the man page for usermod. The command typed in my previous post worked fine. I run an 'id' command on my username and the vboxusers is now listed. According to all the manuals that i found, using useradd was supposed to do the trick, but that's not true. Apparently, on my system, usermod is the way to go.
Thanks a lot for clearing that up for me, i appreciate it.
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195
Rep:
You are confusing the useradd command with adduser. The latter allows you to add a user to a group. That is what makuyl said but no one paid attention.
It is either adduser username groupname, or adduser groupname username. Check the command line options.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.