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
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:
Post a Comment