Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

linux - useradd: group user1 exists - if you want to add this user to that group, use -g

Tags:

unix

When i try to create user1 i got the error useradd: group student1 exists - if you want to add this user to that group, use -g. what could be the issue here?

like image 813
kumar Avatar asked Oct 20 '25 14:10

kumar


1 Answers

By default when you execute command useradd user1 it will create user and group with the same name. If you don't want create a group you should provide existing one:

useradd -g user_group user_name 

Read more: http://www.cyberciti.biz/faq/howto-linux-add-user-to-group/

like image 130
Serge Avatar answered Oct 23 '25 07:10

Serge



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!