10 More Discussions You Might Find Interesting
1. 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
2. Shell Programming and Scripting
Hi,
I am trying to run commands on a list of servers that I can ssh to and just want to know if there is a 'cleaner' way of doing this.
At the moment, I am doing as below. Is there a way that I can escape the double quote differently? If a use a single quote to enclose the commands that I... (1 Reply)
Discussion started by: newbie_01
1 Replies
3. Shell Programming and Scripting
Hello,
I'm trying to create a ksh script to ssh to a remote server, enter the password and a couple commands. For security reasons I have changed the login, password and ip in my example.
#!/bin/ksh
ssh -t -t username@12.5.5.3 << EOF
password
cd bin
pwd
EOF
When I run it. It... (5 Replies)
Discussion started by: seekryts15
5 Replies
4. Shell Programming and Scripting
Hi
Wishing to all.
I am very new joined in an organization as a unix system administrator.
I need a help in preparing a script for a report.
i have a file contains all of the linux/ubuntu servers line by line around 140 servers.
vi servers.txt
nh01
nh02
nh03
bh01
bh04
-
-
:wq (3 Replies)
Discussion started by: kumaraswamy
3 Replies
5. Shell Programming and Scripting
Hello I have a script which is working fine so far to generate HTML file. Now i am wondering how do i include a syntax where it can change itself to root user and execute a specific commands as root user.
Please help, Thanks in advance.
-Siddhesh (2 Replies)
Discussion started by: Siddheshk
2 Replies
6. UNIX for Dummies Questions & Answers
so i want to monitor a variety of things on hundreds of servers. the old process was to have an agent running on each one of these servers.
but now i'm looking to see if its possible to have agentless monitoring. the only other straight forward option other than having an agent on the hosts, is... (2 Replies)
Discussion started by: SkySmart
2 Replies
7. Shell Programming and Scripting
is it possible that we can restrict the root user if he runs some commands?? e.g i want if root runs command 'rm etc/passwd', he shoudn't be able to run command and throws error :confused: (3 Replies)
Discussion started by: sheelsadan
3 Replies
8. UNIX for Dummies Questions & Answers
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
9. HP-UX
Hi
I have been asked to find out how to
1) create users
2) reset passwords
3) kill processes that may require root privileges
without having root password, sudo rights or rights to passwd command
Any ideas?
Thanks in advance (1 Reply)
Discussion started by: emealogistics
1 Replies
10. UNIX for Advanced & Expert Users
I have to write a script (not C based) that allows to capture of all commands issued by the user “root”.
First, I tried to monitor the .bash_history but the commands are written in chunk after the .bash_history is closed.
How can I capture the commands in Real-Time without waiting root to... (4 Replies)
Discussion started by: elieifrah@gmail
4 Replies