Categories
Welcome Center
Education & Development
Discussions
Certification Preparation
Recent Posts
Groups
Free Resources
Ebooks
Free Workshops
Trending Certifications Infographic
Infosec Training
IT & Security Training
Live Boot Camps
Security Awareness Training
About Infosec Institute
Home
Discussions
Off Topic
How to add user to domain admin in linux?
kriscamaro68
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?
Find more posts tagged with
Save $250 on 2025 certification boot camps from Infosec!
Book now with code EOY2025
Button
Comments
Unamerican Idol
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
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
carboncopy
read too fast
Grynder
I have always used gpasswd -a username group
Quick Links
All Categories
Recent Posts
Activity
Unanswered
Groups
Best Of
INFOSEC Boot Camps
$250
OFF
Use code
EOY2025
to receive $250 off your 2025 certification boot camp!
BROWSE BOOT CAMPS