Question: We have some users on all app servers in Stratos Datacenter. Some of them have been assigned some new roles and responsibilities, therefore their users need to be upgraded with sudo access so that they can perform admin level tasks.
a. Provide sudo access to user jim on all app servers.
b. Make sure you have set up password-less sudo for the user.
Please Note:- Perform the below commands based on your question server, user name & other details that might differ. So please read the task carefully before executing it. All the Best 👍
thor@jump_host ~$ ssh tony@stapp01 The authenticity of host 'stapp03 (172.16.238.12)' can't be established. ECDSA key fingerprint is SHA256:jQBzPUeKPaiyjrpKdy6e4PG/2IswOUaZYIogb7o1SHE. ECDSA key fingerprint is MD5:1f:11:06:a6:ec:6c:f5:37:38:31:79:ad:a6:70:94:37. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'stapp01,172.16.238.10' (ECDSA) to the list of known hosts. tony@stapp01's password: [tony@stapp01~]$ sudo su - We trust you have received the usual lecture from the local System Administrator. It usually boils down to these three things: #1) Respect the privacy of others. #2) Think before you type. #3) With great power comes great responsibility. [sudo] password for tony: [root@stapp01 ~]# |
[root@stapp01 ~]# id jim |
[jim@stapp01 ~]$
logout
[root@stapp01 ~]# [root@stapp01 ~]# visudo [root@stapp01 ~]# [root@stapp01 ~]# su - jim Last login: Tue Jul 20 17:48:02 UTC 2021 on pts/0 [jim@stapp01 ~]$ [jim@stapp01 ~]$ sudo cat /etc/sudoers |grep jim jim ALL=(ALL) NOPASSWD:ALL [jim@stapp01 ~]$ [jim@stapp01 ~]$ |
Happy Learning!!!!
0 Comments