Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Allow a user use a specific root command! Post 302387002 by mehrdad68 on Thursday 14th of January 2010 08:48:48 AM
Old 01-14-2010
So what if everybody can use the command? It's just informative!
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

login into root from user and execute command through script

i have logged in as user. I want to write a script to login into root and execute commands for eg. ifconfig or other command. kindly help me out. (6 Replies)
Discussion started by: pradeepreddy
6 Replies

2. Shell Programming and Scripting

root user command in shell script execute as normal user

Hi All I have written one shell script for GPRS route add is given below named GPRSRouteSet.sh URL="www.google.com" VBURL="10.5.2.211" echo "Setting route for $URL for GPRS" URL_Address=`nslookup $URL|grep Address:|grep -v "#"|awk -F " " '{print $2}'|head -1` echo "Executing ... (3 Replies)
Discussion started by: mnmonu
3 Replies

3. UNIX for Dummies Questions & Answers

How to allow access to some commands having root privleges to be run bu non root user

hi i am new to unix and i have abig task. i have to \run particular commands having root privileges from a non root user. i know sudo is one of the way but i need sum other approach kindly help Thanks (5 Replies)
Discussion started by: suryashikha
5 Replies

4. Shell Programming and Scripting

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: (3 Replies)
Discussion started by: abhishek1979
3 Replies

5. Cybersecurity

How to limit patchadd command to root user only?

How to limit patchadd command to root user only? I'm running a solaris 10 5/09 server, I have 2 users other than root. One being able to use the patchadd command and one is unable to do so. What I'm trying to do is to limit the patchadd command so that only root is able to run it. (7 Replies)
Discussion started by: ShouTenraku
7 Replies

6. AIX

find command to list all the 777 files and directories owned by root user

Hi I'm logged in to an AIX box now and we need to do an audit on this box. cbssapr01:# pwd / Which command will show all the files and directories owned by root user with permissions as 777 ? (8 Replies)
Discussion started by: newtoaixos
8 Replies

7. UNIX for Dummies Questions & Answers

Sudo to delegate permission from non-root user to another non-root user

I've been through many threads before i decide to create a separate thread. I can't really find the solution to my (simple) problem. Here's what I'm trying to achieve: As "canar" user I want to run a command, let's say "/opt/ocaml/bin/ocaml" as "duck" user. The only to achieve this is to... (1 Reply)
Discussion started by: canar
1 Replies

8. UNIX for Dummies Questions & Answers

Execute a command as root from normal user

Hi , I am trying to stop and start a process using the below code. I have sudo access on my machine ## PID = process id echo "$PASSWD" | sudo -S kill -9 <PID> echo "$PASSWD" | sudo -S /opt/abc/startserver /opt/abc/startserver: error while loading shared libraries: librts.so: cannot open... (6 Replies)
Discussion started by: rakeshkumar
6 Replies

9. Shell Programming and Scripting

Execute a command with root user

i m logged in with user1 id. i wish to execute the below as root user for which i tried several commands but all of them fail. sudo 'cat /tmp/tmp.file >>/etc/logger' Password: sudo: cat /tmp/tmp.file >>/etc/logger: command not found sudo cat /tmp/tmp.file >>/etc/logger bash:... (5 Replies)
Discussion started by: mohtashims
5 Replies

10. UNIX for Beginners Questions & Answers

Running a command as another non-root user

Hi, I am trying to run a command within my KSH script as another user due to permission issues, now both users are non root. I have tried the following command and was unsuccessful: echo "<password>" | sudo -S -u <username> -k command Can I use sudo to run a command as a non-root user? (5 Replies)
Discussion started by: MIA651
5 Replies
ctrun(1)							   User Commands							  ctrun(1)

NAME
ctrun - execute command in a process contract SYNOPSIS
/usr/bin/ctrun [options] command [ argument...] DESCRIPTION
The ctrun utility starts a command in a newly created process contract. ctrun holds the contract and can be instructed to output or respond to events that occur within the contract. For additional information about process contracts, see contract(4) and process(4). OPTIONS
The following options are supported: -i event,[event ...] -f event,[event ...] Sets the informative and fatal events, respectively. The following are valid events: core A member process dumped core. core events are informative by default. empty The last member of the process contract exited. exit A member process exited. fork A process was added to the process contract. hwerr A member process encountered a hardware error. hwerr events are fatal by default. signal A member process received a fatal signal from a process in a different process contract. Only core, hwerr, and signal events can be made fatal. More events can be delivered than requested if ctrun requires them for its own purposes. For example, empty messages are always requested if a lifetime of contract is specified. See -l. -l lifetime The following valid lifetime values are supported: child ctrun exits when the command exits, regardless of whether the contract is empty. contract ctrun exits only when the contract exits. This is the default. none ctrun exits immediately, orphaning the contract. -o option,[option ...] The following options are supported: noorphan Kills all processes in the contract if the holder (ctrun) exits. This option is invalid when a lifetime of none is specified. pgrponly If a fatal error occurs, kills at most the process group of which the errant process is a member. regent The contract inherits inheritable contracts when abandoned by member processes. -r count If the contract encounters a fault, this option attempts to restart the command count times. If count is 0, the attempt to restart con- tinues indefinitely. By default, ctrun does not attempt to restart the command. This option is invalid if a lifetime other than contract is specified or if the pgrponly option is used. -t If the contract created by ctrun inherited subcontracts from its member processes, attempts to transfer them to the new contract when restarting. This option is invalid unless -r is also specified. -v Displays contract events and ctrun actions as they occur. -V Displays verbose contract events, as are displayed by the -v option of ctwatch. Implies -v. OPERANDS
The following operands are supported: argument One of the strings treated as an argument to command. command The command to be passed to execvp(2). See exec(2). EXAMPLES
Example 1: Running a Shell in a New Process Contract The following example runs a shell in a new process contract: example% ctrun -l child -o pgrponly ksh The -l child option argument is specified so that ctrun won't wait until all children of the shell have exited. -o pgrponly is specified because an interactive ksh puts each job in a new process group, and an error in one job is unlikely to affect the others. Example 2: Running a Simple Server The following example runs a simple server: example% ctrun -r 0 -t -f hwerr,core,signal server The -r 0 and -t options are specified to indicate that if the server encounters a fatal error, ctrun should try to restart it. The -f option makes "hwerr", "core", and "signal" fatal events. EXIT STATUS
If command is specified and successfully invoked (see exec(2)), the exit status of ctrun is the exit status of command. Otherwise, ctrun exits with one of the following values: 123 The child process exited abnormally. 124 ctrun encountered an internal error. 125 Invalid arguments were provided to ctrun. 126 command was found but could not be invoked. 127 command could not be found. FILES
/system/contract/process/* ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ |Interface Stability |See below. | +-----------------------------+-----------------------------+ Human Readable Output is Unstable. Invocation is Evolving. SEE ALSO
ctstat(1), ctwatch(1), exec(2), contract(4), process(4), attributes(5) SunOS 5.10 15 Jul 2004 ctrun(1)
All times are GMT -4. The time now is 11:24 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy