Skip to content

Instantly share code, notes, and snippets.

@popucui
Last active June 3, 2018 13:24
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 popucui/6b3a0dcbb960c0bf071273d16c89cdce to your computer and use it in GitHub Desktop.
Save popucui/6b3a0dcbb960c0bf071273d16c89cdce to your computer and use it in GitHub Desktop.
# add user "hwang"
# this method is old way on Ubuntu nowadays, for modern way of doing this, should use "adduser"
sudo useradd hwang -m -b /data/home -s /bin/bash
# add to group
sudo usermod -g dev hwang # For primary group "dev"
sudo usermod -a -G admin hwang # For secondary group "admin"
#add new user named "zhangshan"
sudo useradd zhangsan group001
#change password
sudo passwd zhangshan
## add/delete user from SGE user list
#add "zhangshan" to a userlist "arusers"
qconf -au zhangshan arusers
#show userlist "arusers" member to make sure previous set as expected
qconf -su arusers
#delete a user from userlist
qconf -du zhangshan arusers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment