/ Published in: Bash
Expand |
Embed | Plain Text
#! /bin/bash useradd -m -s /bin/bash -G wheel <user> mkdir /home/<user>/.ssh echo "ssh-rsa <public key>" > /home/<user>/.ssh/authorized_keys chown -R <user>:<user> /home/<user> chmod 600 /home/<user>/.ssh/authorized_keys echo "#include /etc/sudoers.local" >> /etc/sudoers echo "%wheel ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.local chmod 440 /etc/sudoers.local
You need to login to post a comment.
