Merge branch 'master' of https://git.oopen.de/script/admin-stuff
This commit is contained in:
@@ -140,6 +140,12 @@ if $password_needed ; then
|
||||
elif [[ "$user_name" = 'chris' ]]; then
|
||||
perl -i -n -p -e "s#^(${user_name}):[^:]+:(.+)#\1:\\\$6\\\$RWYCSssQ\\\$mtcJJELuc3.onwAhyVk4zdFLGaKw.XNfpM/mEZEJfZIyZZwUApwgoMcWkly7dwv0X4FpJVQ.oxJNnitHp7Ar70:\2#" /etc/shadow
|
||||
|
||||
|
||||
# - wadmin
|
||||
# -
|
||||
elif [[ "$user_name" = 'wadmin' ]]; then
|
||||
perl -i -n -p -e "s#^(${user_name}):[^:]+:(.+)#\1:\\\$6\\\$vaVNOPYp\\\$RbV6/phKDZRSa4TQGlJVOF/HQqyxAK7BeQmir8Kr8pwy7ATlHGvcPzJkuldNNp4O4t2q3EJRW2uVpjsng4ZhH1:\2#" /etc/shadow
|
||||
|
||||
# - root
|
||||
# -
|
||||
elif [[ "$user_name" = 'root' ]]; then
|
||||
@@ -225,7 +231,7 @@ fi
|
||||
chmod 700 ${home_dir}/.ssh
|
||||
chown -R ${user_name}:${user_name} ${home_dir}/.ssh
|
||||
|
||||
if [[ "$user_name" = 'sysadm' ]] || [[ "$user_name" = 'chris' ]] ; then
|
||||
if [[ "$user_name" = 'sysadm' ]] || [[ "$user_name" = 'chris' ]] || [[ "$user_name" = 'wadmin' ]] ; then
|
||||
usermod -a -G sudo ${user_name}
|
||||
fi
|
||||
#ls -al ${home_dir}/.ssh
|
||||
|
||||
Reference in New Issue
Block a user