Monday, April 14, 2014

Remove ec2-user default privilege


  1. useradd to add a new user account
  2. Create password for the new user, add it to the sudoer list
  3. Enable PasswordAuthentication in /etc/ssh/sshd_conifg
  4. Change root password
  5. Lock ec2-user: passwd -l ec2-user
  6. Delete /etc/sudoers.d/xx
  7. Now the ec2-user has no root permission

Reference:
http://blog.braini.ac/?p=73

No comments:

Post a Comment