Crear un usuario con todos los permisos de root

Page last edited hace 2208 días 8 horas
De Solaris-ES
Saltar a: navegación, buscar

Creamos un profile nuevo llamado "Root Rights"[editar]

root@sol11:~# profiles -p "Root Rights" -S files
profiles:Root Rights> set desc="All Administratvie Tasks"
profiles:Root Rights> set auths=solaris.*
profiles:Root Rights> add cmd=*
profiles:Root Rights:*> set uid=root
profiles:Root Rights:*> set gid=root
profiles:Root Rights:*> end
profiles:Root Rights> 
profiles:Root Rights> info
        name=Root Rights
        desc=All Administratvie Tasks
        auths=solaris.*
        cmd=*
profiles:Root Rights> 
profiles:Root Rights> verify
profiles:Root Rights> exit

Verificamos el nuevo profile[editar]

root@sol11:~#  cat /etc/security/prof_attr
#
# The system provided entries are stored in different files
# under "/etc/security/prof_attr.d".  They should not be
# copied to this file.
#
# Only local changes should be stored in this file.
# This line should be kept in this file or it will be overwritten.
#
Root Rights:::All Administratvie Tasks:auths=solaris.*

Modificamos la descripcion (Solo como ejemplo, no es necesario!) y verificamos el cambio[editar]

root@sol11:~# profiles -p "Root Rights" -S files
profiles:Root Rights> set desc="All Administrative Rights"
profiles:Root Rights> exit
root@sol11:~#  cat /etc/security/prof_attr
#
# The system provided entries are stored in different files
# under "/etc/security/prof_attr.d".  They should not be
# copied to this file.
#
# Only local changes should be stored in this file.
# This line should be kept in this file or it will be overwritten.
#
Root Rights:::All Administrative Rights:auths=solaris.*

Asignamos el nuevo perfil al usuario tiadm[editar]

root@sol11:~# usermod -P "Root Rights" tiadm

Probamos el nuevo perfil del usuario[editar]

tiadm@sol11:~$ pfbash
bash-4.1# id
uid=0(root) gid=0(root)
tiadm@sol11:~$ pfexec id
uid=0(root) gid=0(root)