sudo scripts conundrum


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting sudo scripts conundrum
# 1  
Old 07-27-2012
sudo scripts conundrum

hello; Got a problem running monitoring scripts using sudo ssh.. Mgmt decided to take away root sudoers access.. so most of the scripts ran as:

Code:
sudo ssh $BOX ...

Now I need to run them as:

Code:
echo $my_pw | sudo -S -l my_user_id $BOX ...

I tried this but not working..

Any wisdom/tricks would be appreciated..
Thank you
# 2  
Old 07-27-2012
If you were really running 'sudo ssh', no wonder they decided to take away your root access. It makes no sense to login as root locally before logging in as root somewhere else. Try ssh root@host
# 3  
Old 07-27-2012
Quote:
It makes no sense to login as root locally before logging in as root somewhere else.
No I do not login locally as root..
However, I am in the sudoers to be root in Remote Boxes that I run scripts against.
Just to clarify, passwordless login to remote boxes for root was taken away
Thnx
# 4  
Old 07-27-2012
That'd be ssh sudo, not sudo ssh.

You can arrange passwordless root login by setting up ssh keys.
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. OS X (Apple)

Help in explaining this echo conundrum.

OSX 10.12.3, default bash terminal. Consider this code and note it is calling 'sh' inside the code... #!/bin/sh echo '1\n2\n2\n3\n5' > /tmp/text hexdump -C /tmp/text /bin/echo '1\n2\n3\n4\n5' > /tmp/text hexdump -C /tmp/text Now view the interactive mode below, note the underlying shell is... (6 Replies)
Discussion started by: wisecracker
6 Replies

2. IP Networking

iptables conundrum

Ok, if youre reading this prepare yourself.(debian based os) so im trying to do this routing with ip tables, i need to forward/SNAT traffic from 192.168.111.1 to 10.10.10.250, the 192.x.x.x ips are being shoved into a honeyd like program called inetsim so its offline, 10.10.10.125 is connected... (3 Replies)
Discussion started by: Shocco
3 Replies

3. Shell Programming and Scripting

Problem connect to a different server then do sudo login and finally run some scripts and get result

I have to write a shell script in my current linux server and I have to connect to a different server then do sudo login and finally run some scripts residing in a particular directory and get results back. I am starting to write my shell script as below but after I do ssh login it prompts for... (2 Replies)
Discussion started by: Devesh5683
2 Replies

4. Red Hat

Physical Volume Create Conundrum

I want to start by saying I already resolved my issue but I want to understand why I am seeing what I am seeing. I have a server with a RAID controller two 500GB drives and six 600GB drives. The two 500GB drives are mirrored and have the OS installed on them. The six 600GB they wanted set as... (4 Replies)
Discussion started by: scotbuff
4 Replies

5. Shell Programming and Scripting

Conundrum - Flexible way to strip extension

Hi, First post here. I have something that may prove to be difficult. I have the following files: Example1.0.0.tar.gz Example2.tar Example3.zip Example4.0.0.0.0.0.bzip2 I need to remove the file extensions and store as a variable so they look like this: Example1.0.0 Example2... (3 Replies)
Discussion started by: Spadez
3 Replies

6. UNIX for Dummies Questions & Answers

umask conundrum

Hi All, i was reading up on a umask question on this forum and have a question on this. the umask value on my home PC running on cygwin is 022. when i create a dir it defaults to permission 755, when i create a file it defaults to 644. Now it starts at 777 for dirs and 666 for files and... (1 Reply)
Discussion started by: Irishboy24
1 Replies

7. Cybersecurity

Running Scripts With Parameters with sudo

Hello everyone, I'm new to the community so please bear with me if my terminology is not correct... I'm trying to configure /etc/sudoers so a specific user can run a script as root. My problem is I want to lock down what parameters the user can run the script against. The script in... (2 Replies)
Discussion started by: cyphex
2 Replies

8. Shell Programming and Scripting

Help with sudo in shell scripts

hi, I have a script abc in a machine xyz. which i can access by sudo su - user. that is i can login to xyz using my id and then switch to user and run the script. Now what i need to do is run the script from another script in machine xyz1. From xyz1 i can ssh to xyz using my id. Some one... (1 Reply)
Discussion started by: rvz
1 Replies
Login or Register to Ask a Question