Monday, July 25, 2016

Create read only user on AWS Server & provide sudo access without PPK key


Configuring sudo Access
1. Log in to the system as the root user

2.  Create a normal user account using the useradd command. Replace USERNAME with the user name that you wish to create.

#useradd  USERNAME

3. Set a password for the new user using the passwd command.

# passwd  USERNAME
Changing password for user USERNAME.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.

4. Run the visudo to edit the /etc/sudoers file. This file defines the policies applied by the sudo command.

#visudo

5. Find the lines in the file that grant sudo access to users in the group USERNAME when enabled.

## Allow root to run any commands anywhere
root    ALL=(ALL)       ALL
USERNAME   ALL=(ALL)       ALL

Read only user access without PPK key
Go to /etc/ssh/sshd_config
PasswordAuthentication yes   -----enable password Authentication
/etc/init.d/sshd reload   ---- reload sshd server.




No comments:

Post a Comment