octubre 11, 2012

Como restringir la escala a usuario Root

Como restringir a usuarios el escalar a usuario root por medio del comando su y especificar que usuarios si pueden acceder pero perteneciendo al grupo de sistema wheel.

Quitamos el simbolo # de comentario de la linea 7 para activar la opcion
[user@host ~]# vim /etc/pam.d/su
#%PAM-1.0
auth sufficient pam_rootok.so
# Uncomment the following line to implicitly trust users in the “wheel” group.
#auth sufficient pam_wheel.so trust use_uid
# Uncomment the following line to require a user to be in the “wheel” group.
auth required pam_wheel.so use_uid
auth include system-auth
auth include postlogin
account sufficient pam_succeed_if.so uid = 0 use_uid quiet
account include system-auth
password include system-auth
session include system-auth
session include postlogin
session optional pam_xauth.so

Agregar a usuarios a grupo wheel para tener acceso a su
[user@host ~]# gpasswd -a miuser wheel
Comprobamos que pertenesca nuestro usuario al grupo.
[user@host ~]# grep miuser /etc/group
wheel:x:10:root,miuser 
miuser:x:500:

No hay comentarios.:

Publicar un comentario