To use pfexec similarly to sudo, use “usermod” to give the account the “Primary Administrator” profile:
# usermod -P'Primary Administrator' aleonard
“aleonard” will now be able to preface commands with “pfexec” to run them as root, similar to sudo when configured not to prompt for a password.
References: Less known Solaris features: pfexec
Post a Comment