This assumes you are now connected to the server via SSH.
sudo -s
Enter root mode for admin accessgroupadd devgroup
Create new group to be later granted access to /var/www/html
useradd -G root,devgroup masterdev
Create new root user. Also add to the devgrouppasswd masterdev
Change 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_config
Edit SSH config file- Make sure this is set:
PasswordAuthentication yes
service sshd restart
vi /etc/sudoers
Edit 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!
.