How to add user to domain admin in linux?
kriscamaro68
Member Posts: 1,186 ■■■■■■■□□□
in Off-Topic
It has been a long time since I have done this and forgot how. This is the command I am running: sudo /usr/sbin/usermod -G 'dom admins' 'user' but It says unkown group. I know we have done it before but is there a default group in samba that controls domain admins and maybe I am typing it in wrong. I have also tried typing in domain admins in lower and upper case for the group. Any ideas?
Comments
-
Unamerican Idol Member Posts: 7 ■□□□□□□□□□you need to find out the name of the group you want to add the user into.
cat /etc/group will print out the names of all the groups that exist.
then do useradd -G groupName userName and the next time the user logs in, they'll be part of the group. -
Silver Bullet Member Posts: 676 ■■■□□□□□□□If you use just "usermod -G groupname username", then it will remove any other supplementary groups that user was a member of. I would recommend using it with the -a (append).
usermod -a -G groupname username