Skip to content

Instantly share code, notes, and snippets.

@cowboycoded
Created May 18, 2011 12:53
Show Gist options
  • Save cowboycoded/978519 to your computer and use it in GitHub Desktop.
Save cowboycoded/978519 to your computer and use it in GitHub Desktop.
useradd app_user
passwd app_user
vi /etc/sudoers #open sudoers in your favorite text edit
# add the following line below "root ALL=(ALL) ALL" :
# app_user ALL=(ALL) ALL
# save file and exit
#disable root login from ssh, so nobody is able to brute force a root login
vi /etc/ssh/sshd_config
#uncomment "PermitRootLogin yes" and change it to "PermitRootLogin no"
/etc/init.d/sshd restart
#logout and login or su to your new user
su app_user
cd ~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment