10 More Discussions You Might Find Interesting
1. Programming
hi all,
i think i have got the solution for this but want to run it past you guys first
when i run a script sometimes its necassary to sudo to root so it can create users, chmod etc etc, the normal way for me doing this is just to simply run the script as root
but i have created a user... (11 Replies)
Discussion started by: robertkwild
11 Replies
2. UNIX for Beginners Questions & Answers
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
3. Shell Programming and Scripting
Close duplicate thread. (0 Replies)
Discussion started by: denissi
0 Replies
4. Shell Programming and Scripting
Hi All, my script.sh has the below lines, and i need to run the script as root or wam. please tell me if this will work
#!/bin/bash
sudo -t wam /usr/local/wam/stopwam -r ------- this needs run as wam user
/usr/local/web/stopweb -a --- this needs to run as... (18 Replies)
Discussion started by: nanz143
18 Replies
5. UNIX for Dummies Questions & Answers
I have a script (ksh) that has permissions 775 and owned by root.system. This script takes the parameter of a full file name and chmods the file to 666 and changes ownership to user smith.staff.
ex: modify_file.ksh /home/smith/filea
modify_file.ksh has 775 and root.system ownership.
The... (1 Reply)
Discussion started by: mlacriola
1 Replies
6. Solaris
In my ENV every one has sudo access to "XYZ" user and they run the script any time.
can you please suggest how could I identify who has executed script after sudo user XYZ ?
OS : sunSolaris
process of login
Step 1 : user login with his own username and PWD
Step 2 : sudo to XYZ user... (1 Reply)
Discussion started by: yogendra.barode
1 Replies
7. Shell Programming and Scripting
Hi all,
I have to run C++ file using root programming, using following commands:
$root -l
root .L TwoTrees.C++
root TwoTrees t
root t.Loop()
root.q
I wonder if I can write script to do the following.
Thanks
Pooja (12 Replies)
Discussion started by: nrjrasaxena
12 Replies
8. Shell Programming and Scripting
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
9. Cybersecurity
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
10. Shell Programming and Scripting
Dear All
I am running into a situation where I am running a script as another user lets say oracle using su command as below, and the script fails because the .profile of oracle is not executed so the environment variables are not set.
cat /etc/passwd | grep oracle... (4 Replies)
Discussion started by: dbsupp
4 Replies