Skip to content

Instantly share code, notes, and snippets.

@mrgcohen
Last active August 29, 2015 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrgcohen/7ec47aa3b81c76b9359b to your computer and use it in GitHub Desktop.
Save mrgcohen/7ec47aa3b81c76b9359b to your computer and use it in GitHub Desktop.
# WINDOWS: Add domain user and put them in Domain Admins group
net user username password /ADD /DOMAIN
net group "Domain Admins" username /ADD /DOMAIN
# WINDOWS: Add local user and put them local Administrators group
net user username password /ADD
net localgroup Administrators username /ADD
# LINUX: Add a new user to linux and put them in the wheel group
useradd -G wheel username
# LINUX: Set the new user's password
passwd username
# LINUX: If the shell is non-interactive set the password using chpasswd
echo "username:newpass"|chpasswd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment