Operating System - HP-UX
1833924 Members
3441 Online
110063 Solutions
New Discussion

Re: sudo for sub commands of a application

 
T G Manikandan
Honored Contributor

sudo for sub commands of a application

Will sudo help for the sub commands of a general command.

I have problem with one of the commands of clearcase.It is cleartool

cleartool is a generic command.it has got various sub commands.

giving sudo privilege to the cleartool involves huge risk.

Using one of the sub commands with cleartool on sudo gets it to the root prompt.

Suggestions are welcome
5 REPLIES 5
Michael Tully
Honored Contributor

Re: sudo for sub commands of a application

Hi TG,

I happen to have done this recently. Let me know if it works for you.

User_Alias CCADMIN = ccadmin

# Cmnd alias specification
Cmnd_Alias CLEARTOOL_NOSHELL=/ccase/atria/bin/cleartool [! ]*, !/ccase/atria/bin/cleartool shell*, !/ccase/atria/bin/cleartool !*

# User privilege specification
CCADMIN psdev1=(ALL) CLEARTOOL_NOSHELL

Regards
Michael
Anyone for a Mutiny ?
T G Manikandan
Honored Contributor

Re: sudo for sub commands of a application

Micheal,

THanks for the response.You can brief me as what is done above.

Please revert
Michael Tully
Honored Contributor

Re: sudo for sub commands of a application

The example I gave was to have a certain function of clearcase obviously run as root. The '!' symbols are supposed to represent an option where the user can't exit from the command to run a shell (as root), in other words remain captive.
Anyone for a Mutiny ?
T G Manikandan
Honored Contributor

Re: sudo for sub commands of a application

Micheal

This syntax does not work for me.
It just tells user is not allowed to execute command as root

Cmnd_Alias CLEARTOOL_NOSHELL=/ccase/atria/bin/cleartool [! ]*, !/ccase/atria/bin/cleartool shell*, !/ccase/atria/bin/cleartool !*
T G Manikandan
Honored Contributor

Re: sudo for sub commands of a application

When I do a

$sudo cleartool setview

It gets back to the shell with root privileges