Monday, 27 July 2015

How to create password less sudo linux user access on RHEL linux

This can be achieved by Creating admin group then creating user with admin group.

and the by adding admin group in /etc/sudoers file.

Step-1:Create admin group
/usr/sbin/groupadd -g 2000 admins

Step2: Create user with admin group.
/usr/sbin/useradd -u 1102 -g admins newuser

Step-3: Add admin group in /etc/sudoers file.

#visudo

root    ALL=(ALL)       ALL
#Add below line in the file
%admins ALL=(ALL)       NOPASSWD:ALL

To set the password
passwd newuser

No comments: