Sponsored Content
Full Discussion: sudo command remotely
Top Forums Shell Programming and Scripting sudo command remotely Post 302210413 by danmero on Tuesday 1st of July 2008 01:16:42 AM
Old 07-01-2008
Please read https://www.unix.com/unix-dummies-que...om-forums.html before posting, especially rule number 5.
The basic concept is:
Code:
ssh user@host "sudo run your commands/scripts remotely..."

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Remotely executing awk command

ssh user@machine awk '{ split ($1,ar,"!");print ar}' samp >samp1 Error: Unmatched '. However on <machine> awk '{ split ($1,ar,"!");print ar}' samp >samp1 executes successfully. Any suggestions. (1 Reply)
Discussion started by: bishweshwar
1 Replies

2. Solaris

Sudo for a command

I am trying to set up sudo for a command, but do not want to specify the arguments that can be passed into it. I want the user who is using sudo to be able to pass in the arguments they want. I am fairly sure I know how to do this with RBAC in Solaris 10, but for reasons I will not get into I... (1 Reply)
Discussion started by: synchro
1 Replies

3. Shell Programming and Scripting

running command remotely to populate local variable

If I run this # ssh remote-server 'du -sk /usr/platform/`uname -i`/' 174 /usr/platform/SUNW,Sun-Fire-V245 I get my output just fine, However, if i try to do the same but populate a local variable within my script called for example 'result' #!/bin/ksh result=`ssh remote-server... (3 Replies)
Discussion started by: hcclnoodles
3 Replies

4. Shell Programming and Scripting

sudo command with password

Hello everybody, Say I forgot my root password (shit happens, no?) and I'd like to brutally try 100 possibilities to delete a file using sudo. How can I make a script that tries all the passwords? The following doesn't work. Do you have a clue? foo:~$ cat test sudo rm dummy <<< 'password' echo... (1 Reply)
Discussion started by: chebarbudo
1 Replies

5. Solaris

How to securely invoke a Solaris privildged command (root) remotely?

Hi, What I would like to do "securely" is the following. From one central server invoke a script that does the following. --Store user/name passwords. (password possibly encrypted in config file) --From the central server invoke a privileged command (i.e. route add) on multiple... (1 Reply)
Discussion started by: topstuff
1 Replies

6. UNIX for Advanced & Expert Users

Sudo command

Hello, What does the below sudo command provide access to, does it allow a user to su to any other user except root. sudo !/usr/bin/su * (1 Reply)
Discussion started by: sophos
1 Replies

7. UNIX for Dummies Questions & Answers

Unable to use the Sudo command. "0509-130 Symbol resolution failed for sudo because:"

Hi! I'm very new to unix, so please keep that in mind with the level of language used if you choose to help :D Thanks! When attempting to use sudo on and AIX machine with oslevel 5.1.0.0, I get the following error: exec(): 0509-036 Cannot load program sudo because of the following errors:... (1 Reply)
Discussion started by: Chloe123
1 Replies

8. Shell Programming and Scripting

ssh foo.com sudo command - Prompts for sudo password as visible text. Help?

I am writing a BASH script to update a webserver and then restart Apache. It looks basically like this: #!/bin/bash rsync /path/on/local/machine/ foo.com:path/on/remote/machine/ ssh foo.com sudo /etc/init.d/apache2 reloadrsync and ssh don't prompt for a password, because I have DSA encryption... (9 Replies)
Discussion started by: fluoborate
9 Replies

9. Shell Programming and Scripting

ssh execute command remotely

Hi all, Today I want to write a script to run the commands remotely. If I run the command as follows: ssh <user>@<ip> 'ls; pwd' it works fine. But when I want to use ssh to set view in clearcase, it will lose the response. as follows ssh <user>@<ip> 'cleartool setview <view_name>; pwd'... (1 Reply)
Discussion started by: Damon_Qu
1 Replies

10. Shell Programming and Scripting

How to execute command remotely as sudo and save the output locally?

Hello , I am trying to run a NetBackup command in remote server. Also this command can only be run by root so I am using sudo . Also I want the output of the command locally in a file. The below command asked for password , ran successfully and showed Output on my local server screen ... (2 Replies)
Discussion started by: rahul2662
2 Replies
uri_urn(n)					    Tcl Uniform Resource Identifier Management						uri_urn(n)

__________________________________________________________________________________________________________________________________________________

NAME
uri_urn - URI utilities, URN scheme SYNOPSIS
package require Tcl 8.2 package require uri::urn ?1.1.2? uri::urn::quote url uri::urn::unquote url _________________________________________________________________ DESCRIPTION
This package provides two commands to quote and unquote the disallowed characters for url using the urn scheme, registers the scheme with the package uri, and provides internal helpers which will be automatically used by the commands uri::split and uri::join of package uri to handle urls using the urn scheme. COMMANDS
uri::urn::quote url This command quotes the characters disallowed by the urn scheme (per RFC 2141 sec2.2) in the url and returns the modified url as its result. uri::urn::unquote url This commands performs the reverse of ::uri::urn::quote. It takes an urn url, removes the quoting from all disallowed characters, and returns the modified urls as its result. BUGS, IDEAS, FEEDBACK This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category uri of the Tcllib SF Trackers [http://sourceforge.net/tracker/?group_id=12883]. Please also report any ideas for enhancements you may have for either package and/or documentation. KEYWORDS
rfc 2141, uri, url, urn CATEGORY
Networking uri 1.1.2 uri_urn(n)
All times are GMT -4. The time now is 09:06 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy