So I have been working in Solaris, and *nix in general recently for the first time in a long long while. Trying to do various things which may be easy to you guys, but not so much to me. Anyways, here goes it...
I am currently running in Solaris 10 w/ TX, build 42. I have a script which needs to run as though it were root, only when a certain user calls it. I create a rights profile within the SMC modeling it nearly identically to Basic Solaris User, add the desired script as a command, go into "Set Attributes" and set its EUID as root. I then add this rights profile to the user I desire to execute it as root. Within the script, I do an: echo `/usr/ucb/whoami` > blah/blah/blah/blah.log Since I figure this should print out the EUID running the script, which I expect to be root. Well, when run, the log shows the user I assigned the rights profile to, NOT root as I expected (or rather hoped for). I tested to see if that truly was the case by placing shutdown in the script. When running the script, I get an error along the lines "/usr/sbin/shutdown can only be run as root". So I know for a fact the script is not running with an EUID of root. So, why is this? I thought you were supposed to be able to do this with the Rights Profiles? This message posted from opensolaris.org _______________________________________________ opensolaris-discuss mailing list [email protected]
