Execute Root command as Normal user

Hi,

We need to execute a root commmand to change the expiry period of a user but we are getting error as permission denied

Q How can we execute a root command by a normal user ? :mad:

any thing or suggestion will be good .... :b:

Abhishek,

As of my knowledge your not allowed to execute any command , suppose to be executed by "root".

Better thing , check with the system admin to get the things done.

You can have the sysadmin make the command setuid. This is dangerous, and the sysadmin should allow only a few people access to the command.

As noted, the command could be made setuid (assuming its not a shell script). If your system has "sudo", specific users can execute specific or general commands as another user or as root. If you don't have "sudo", try a "man" on "asroot" or "tfadmin" (similar concepts found on some older Unix systems).

sudo (Linux, many other Unixes) : Using sudo
asroot (SCO 3.2v5) :How can I make a shell script setuid so that ordinary usersmay
tfadmin (Unixware 7): uw7 root priveleges sudu asroot -->Re: system shutdown byregular users - asroot won't do it
rbac (Solaris): BigAdmin Submitted Article: Custom Roles Using RBAC in the Solaris OS