Sponsored Content
Top Forums Shell Programming and Scripting Running a script as root but with different users inside Post 302904040 by nanz143 on Sunday 1st of June 2014 11:48:45 AM
Old 06-01-2014
Hey all, I used the below command but my script is unable to take " -r " as argument with the below command.
Code:
su -u wam -c /usr/local/wam/stopwam -r

But it is working for sudo -t wam /usr/local/wam/stopwam -r

Please suggest.

Last edited by Franklin52; 06-02-2014 at 03:34 AM.. Reason: Please use code tags
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Running a command or script as root

I'm writing an application (Progress language) that needs to: 1) load the contents of a cron table into the Progress application; 2) display this information in a human manner and allow a select group of people to update it (these people are logged in as themselves, not as root); 3) save... (3 Replies)
Discussion started by: rm-r
3 Replies

2. UNIX for Dummies Questions & Answers

running sed inside script file

i am substituting some text in the xml file using sed, on shell directly it works fine, but when i run it inside script file, it say, the function cant be parsed, i think the prob is due to xml file, kindly help (4 Replies)
Discussion started by: bajaj111
4 Replies

3. Cybersecurity

Running script through SSH as root

Hi all, I have a situation where I have a shell script that I need to run remotely on multiple *nix machines via SSH. Unfortunately, some of the commands in it require root access. I know that best practices for ssh entail configuring it so that the root account cannot log in, you need to... (4 Replies)
Discussion started by: irinotecan
4 Replies

4. Shell Programming and Scripting

Running a unix script(which is calling another script inside that) in background

Hi all, I am having a script ScriptA which is calling a script ScriptB in the same server and copying files to second server and have to execute one script ScriptC in the second server. THis First script ScriptA is the main script and i have to execute this process continously. for Keeping... (2 Replies)
Discussion started by: rohithji
2 Replies

5. Shell Programming and Scripting

Running a script from if block inside another script

how do i run a script from if block inside another script? this is what i tried but it doesnt seem to work: if test $a -eq $w then sh /home/scripts/script1.bash fi (3 Replies)
Discussion started by: shishirkotkar
3 Replies

6. Shell Programming and Scripting

Issue running script as root

1) Environment:Red Hat Linux, bash shell Script to be run owned by user :myUser Home environment of myUser: pathto/home 2) ESP agent with root access will run JobXXX.sh su - myUser -c "/pathto/home/bin/script.sh" where script.sh has some echo statements and an exit statement in the end... (4 Replies)
Discussion started by: cj09
4 Replies

7. Shell Programming and Scripting

Shell script for to view all users & groups history in root

Dear All, I want to know all users & group history in one file, for root terminal through shell or any other option (5 Replies)
Discussion started by: kpoobathi
5 Replies

8. Shell Programming and Scripting

help in running while loop inside a shell script

I have an input file at ./$1.txt with content of seq numbers like : 1234567890 1234589700 . . so on.. I need to take each seq nbr from the input file ,run the query below: select ackname,seqnbr from event where event_text like '%seqnbr( from the input file)' and redirect the... (11 Replies)
Discussion started by: rkrish
11 Replies

9. Shell Programming and Scripting

Running .sh file inside a shell script

Hello, You might help a newbie like me, I am trying to run a .sh inside my shell script. After running that I need to execute below commands. Here's how my scripts looks like. Hope you can help: #!/bin/sh cd $ORACLE_HOME/owb/bin/unix ./OMBPlus.sh ---> goes to OMB+> directory cd... (10 Replies)
Discussion started by: aderamos12
10 Replies

10. UNIX for Beginners Questions & Answers

Parsing Root password inside a C shell script

Hello everyone, I want to check how long a remote computer is running (e.g. with the command uptime or who - b) The check should be done during login from none root user by a script which is called from .cshrc. My script works fine if I login as root but I want that everybody get the information... (5 Replies)
Discussion started by: Nadielosabra
5 Replies
SVNWRAP(1)						      General Commands Manual							SVNWRAP(1)

NAME
svnwrap - Umask wrapper for subversion client commands SYNOPSIS
svnwrap {program} [args...] DESCRIPTION
svnwrap is a simple shell script to work around permission problems when sharing Subversion repositories between multiple local users. svnwrap can be used either by specifying a particular subversion client command on the command line, or by invoking it by the same name as the desired client command, via a symlink. svnwrap sets the umask to 002, then launches the appropriate subversion client command. For complicated reasons, this is needed when using the clients with BDB-format repositories, but not for FSFS-format ones. EXAMPLES
To create a new BDB-format shared repository (note that FSFS-format shared repositories should also be created this way): svnwrap svnadmin create --fs-type=bdb /path/to/repo chgrp -R shared_group /path/to/repo The following line in /etc/inetd.conf can be used to serve svn:// URLs: svn stream tcp nowait my_svn_user /usr/bin/svnwrap svnserve svnserve -i -r /srv/svn The following commands enable use of svnwrap for local file:/// and remote svn+ssh:// URLs: ln -s /usr/bin/svnwrap /usr/local/bin/svn ln -s /usr/bin/svnwrap /usr/local/bin/svnserve svn is used for local file:/// URLs, and svnserve is invoked by remote users of svn+ssh:// URLs. BUGS
If you symlink the svn binary to svnwrap, as shown in one of the examples, all local users' working copies will also use the new umask. Be sure to warn your users about this, as security-related surprises are rarely pleasant. SEE ALSO
svnserve(8), svn(1), svnlook(1). AUTHOR
svnwrap and this manual were written by Peter Samuelson for the Debian Project (but may be used by others). 2006-04-21 SVNWRAP(1)
All times are GMT -4. The time now is 09:48 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy