mirror of
https://github.com/rorydavidson/ssh_access.git
synced 2025-01-09 13:36:51 +01:00
Update create_rda_user_with_sudo_access.sh
This commit is contained in:
parent
4421df6776
commit
4d0ce58907
@ -4,11 +4,11 @@ MY_SHELL=$( which bash )
|
|||||||
|
|
||||||
/usr/sbin/useradd -c 'Rory Davidson <rda at ihtsdo.org>' -s ${MY_SHELL} -m rda
|
/usr/sbin/useradd -c 'Rory Davidson <rda at ihtsdo.org>' -s ${MY_SHELL} -m rda
|
||||||
cat >/etc/sudoers.d/rda-ALL <<EOF
|
cat >/etc/sudoers.d/rda-ALL <<EOF
|
||||||
kaik ALL=(ALL:ALL) NOPASSWD: ALL
|
rda ALL=(ALL:ALL) NOPASSWD: ALL
|
||||||
EOF
|
EOF
|
||||||
chmod 0440 /etc/sudoers.d/rda-ALL
|
chmod 0440 /etc/sudoers.d/rda-ALL
|
||||||
mkdir ~rda/.ssh
|
mkdir ~rda/.ssh
|
||||||
chmod 700 ~rda/.ssh
|
chmod 700 ~rda/.ssh
|
||||||
curl https://raw.githubusercontent.com/rorydavidson/ssh_access/master/rorydavidson_rsa.pub >~rda/.ssh/authorized_keys
|
curl https://raw.githubusercontent.com/rorydavidson/ssh_access/master/rorydavidson_rsa.pub >~rda/.ssh/authorized_keys
|
||||||
chmod 400 ~rda/.ssh/authorized_keys
|
chmod 400 ~rda/.ssh/authorized_keys
|
||||||
chown -R rda ~rda/.ssh
|
chown -R rda ~rda/.ssh
|
||||||
|
Loading…
Reference in New Issue
Block a user