This assumes you are now connected to the server via SSH.
- sudo -sEnter root mode for admin access
- groupadd devgroupCreate new group to be later granted access to /var/www/html
- useradd -G root,devgroup masterdevCreate new root user. Also add to the devgroup
- passwd masterdevChange password for the new root user
- At this point, you'll need to input your new root user's new password
Next, we'll need to set PasswordAuthentication to On. By default, passwords cannot be used on SSH (Off), so you initially need to use the pem or ppk files. However, since we now have created our new root user, we can change this and set it to "On".
- vi /etc/ssh/sshd_configEdit SSH config file
- Make sure this is set: PasswordAuthentication yes
- service sshd restart
- vi /etc/sudoersEdit the sudoers file
- Add masterdev user after the root's line
root ALL=(ALL) ALL
masterdev ALL=NOPASSWD: ALL
- Since the sudoer file is read-only, you may need to save your changes using :wq!.