I am trying to create a user in Solaris 10 using RBAC who can execute the useradd and userdel commands. But for some reasons after i create the profile, role and user, this user gets a permission denied error when i execute the useradd command. I think i am folllowing the correct steps i think which are as follows:
Creating a Solaris Profile by adding in
/etc/security/prof_attr
Assign this Profile administrative commands in/etc/security/exec_attr
Adding a new Solaris role by using
roleadd
command Set Role password Assign this Role to the Profile using rolemod6.Create a new user and assign this user to the role Add
PATH=$PATH:/usr/sbin
in the .profile of this user and export it. User created Login from this user to Solaris and run useradd.Receiving error UX:useradd: ERROR: Permission denied
I read in some threads and websites that to do this you have to do pfexec or provide sudo access to the role etc. But if Solaris provides RBAC, then above steos are as per Solaris documentation so it should have worked. Can someone please help clarify this or a way in which i can achieve this? Or maybe i am wrong and missing something?
Note: I can do the above if i create a root based user, but there is a requirement do achieve this with an RBAC user.