Skip to content

Instantly share code, notes, and snippets.

@seak0503
Created July 7, 2014 07:16
Show Gist options
  • Save seak0503/2c6388edf78b00c30cc0 to your computer and use it in GitHub Desktop.
Save seak0503/2c6388edf78b00c30cc0 to your computer and use it in GitHub Desktop.
ユーザの作成とパスワード設定を行うシェルスクリプト
#!/bin/bash
# root権限と同じ権限を持つユーザの作成
/usr/sbin/useradd -u 0 -o -g 0 new_superuser
echo "new_superuser:newpassword1" | /usr/sbin/chpasswd
# 一般ユーザの作成
/usr/sbin/groupadd -g 50000 newuser
/usr/sbin/useradd -u 50000 -g 50000 newuser
echo "newuser:newpassword2" | /usr/sbin/chpasswd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment