Sponsored Content
Top Forums Shell Programming and Scripting Change user on remote machine and execute script! Post 302231043 by vbe on Monday 1st of September 2008 10:25:34 AM
Old 09-01-2008
So configure (or install...) sudo on your remote host so that the script is executed by primUser as root...
 

10 More Discussions You Might Find Interesting

1. SCO

Need Script to check whether user exists in the remote machine

Hi All, I am new to shell scripting. Can someone let me know, how to check whether the user exists in the remote system? I am building a new unix box and before I proceed installing the appliation , I want to check whether the required users are created in the system . how to do this ?... (1 Reply)
Discussion started by: Srini75
1 Replies

2. Shell Programming and Scripting

how to execute a script on remote machine

hi unix guru's i am new to unix shell programming. i found a trouble in executing a script(bali.ksh) which is available on serverA with username xyza, this script contains sqlplus command to retrive the data from the database available on other serverC. Now i need to run the above script... (4 Replies)
Discussion started by: balireddy_77
4 Replies

3. Shell Programming and Scripting

change files permission on Remote machine

I would like to change permissions recursively on a remote folder. Seems like sftp has a limitation, I am only able to change permission on a individual file.. sftp > chmod 777 /usr/local/apache/docs/test.txt It would be great if someone has more knowledge on how this is doable recursively? (1 Reply)
Discussion started by: almeisan1
1 Replies

4. Shell Programming and Scripting

Execute command from terminal on remote machine

Hi All, I want to execute some commands on unix machine from the mac machne. I have two options for doing so, I am confused which is the best way of doing. Here are two options. Requirement: Execute command on the remote server machine. Commands to be executed itself contain arguments to be... (0 Replies)
Discussion started by: Ranu
0 Replies

5. Shell Programming and Scripting

How to execute a script hosted on a machine from a different machine

Hi everyone I intend to trigger a script from one machine say mc1 that actually excutes on different machine say mc2 and redirect the logs to that machine mc2. I tried to use nohup <nfs location of machine >/script.sh > <nfs location of machine >/script.log 2>&1 & nfs location of... (2 Replies)
Discussion started by: harneetmakol
2 Replies

6. IP Networking

Execute script located on a remote machine

So, is there way of automating this ? My ultimate goal is to run some cmd script in windows and it should connect to a remote unix host and run a script x.sh located on the remote unix host. I was wanting to achieve this by using WinSCP and Putty only. If possible let me know how and if not... (25 Replies)
Discussion started by: mohtashims
25 Replies

7. UNIX for Dummies Questions & Answers

Execute shell script in remote machine

Hi All, We have 2 servers A and B. B is having a sctipt called b.sh in path /home/dev/scripts. Now my requirement is i want to execute b.sh from server A. Kindly help me. (3 Replies)
Discussion started by: Girish19
3 Replies

8. Shell Programming and Scripting

Execute shell script on remote machine

I want to execute a shell script(set of commands) on remote machine and that script takes input from text file(local machine). Please refer below: ssh user@hostname 'bash -s'< ./test.sh file.txt But i got the error file.txt doesn't exist. Can anyone help me on this. Content of test.sh: ... (2 Replies)
Discussion started by: manishtri88
2 Replies

9. Shell Programming and Scripting

How can I execute local script on remote machine and include arguments?

I have a script in local server cd /home/dell/work/BOP/testdir ./processchk po (here processchk is a script & po is passed as an argument) Now I want to execute this script from remote server ssh $username@$hostname "cd /home/dell/work/BOP/testdir; ./processchk po" But Its getting error... (9 Replies)
Discussion started by: manohar2013
9 Replies

10. Shell Programming and Scripting

Execute ssh command with additional terminal command to any remote user not working script

Hello i am having an issue with bash script and this is the code now=$(cat hosts1.txt | awk '{print $2;}') while read n ;do ssh root@$now 'useradd test1; echo -e "test1\ntest1" | passwd test1 && echo "test1 ALL=(ALL:ALL) ALL" >> /etc/sudoers' When i execute only part with cat, it... (8 Replies)
Discussion started by: tomislav91
8 Replies
SLIPLOGIN(8)						    BSD System Manager's Manual 					      SLIPLOGIN(8)

NAME
sliplogin -- attach a serial line network interface SYNOPSIS
sliplogin [loginname] DESCRIPTION
sliplogin is used to turn the terminal line on standard input into a Serial Line IP (SLIP) link to a remote host. To do this, the program searches the file /etc/sliphome/slip.hosts for an entry matching loginname (which defaults to the current login name if omitted). If a matching entry is found, the line is configured appropriately for slip (8-bit transparent i/o) and converted to SLIP line discipline. Then a shell script is invoked to initialize the slip interface with the appropriate local and remote IP address, netmask, etc. The usual initialization script is /etc/sliphome/slip.login but, if particular hosts need special initialization, the file /etc/sliphome/slip.login.loginname will be executed instead if it exists. The script is invoked with the parameters slipunit The unit number of the slip interface assigned to this line. E.g., 0 for sl0. speed The speed of the line. args The arguments from the /etc/sliphome/slip.hosts entry, in order starting with loginname. Only the super-user may attach a network interface. The interface is automatically detached when the other end hangs up or the sliplogin process dies. If the kernel slip module has been configured for it, all routes through that interface will also disappear at the same time. If there is other processing a site would like done on hangup, the file /etc/sliphome/slip.logout or /etc/sliphome/slip.logout.loginname is executed if it exists. It is given the same arguments as the login script. Format of /etc/sliphome/slip.hosts Comments (lines starting with a `#') and blank lines are ignored. Other lines must start with a loginname but the remaining arguments can be whatever is appropriate for the slip.login file that will be executed for that name. Arguments are separated by white space and follow nor- mal sh(1) quoting conventions (however, loginname cannot be quoted). Usually, lines have the form loginname local-address remote-address netmask opt-args where local-address and remote-address are the IP host names or addresses of the local and remote ends of the slip line and netmask is the appropriate IP netmask. These arguments are passed directly to ifconfig(8). opt-args are optional arguments used to configure the line. EXAMPLES
The normal use of sliplogin is to create a /etc/passwd entry for each legal, remote slip site with sliplogin as the shell for that entry. E.g., Sfoo:ikhuy6:2010:1:slip line to foo:/tmp:/usr/sbin/sliplogin (Our convention is to name the account used by remote host hostname as Shostname.) Then an entry is added to slip.hosts that looks like: Sfoo `hostname` foo netmask where `hostname` will be evaluated by sh(1) to the local host name and netmask is the local host IP netmask. Note that sliplogin must be setuid to root and, while not a security hole, moral defectives can use it to place terminal lines in an unusable state and/or deny access to legitimate users of a remote slip line. To prevent this, a site can create a group, say slip, that only the slip login accounts are put in then make sure that /usr/sbin/sliplogin is in group slip and mode 4550 (setuid root, only group slip can execute binary). DIAGNOSTICS
sliplogin logs various information to the system log daemon, syslogd(8), with a facility code of daemon. The messages are listed here, grouped by severity level. Error Severity ioctl (TCGETS): reason A TCGETS ioctl() to get the line parameters failed. ioctl (TCSETS): reason A TCSETS ioctl() to set the line parameters failed. /etc/sliphome/slip.hosts: reason The /etc/sliphome/slip.hosts file could not be opened. access denied for user No entry for user was found in /etc/sliphome/slip.hosts. Notice Severity attaching slip unit unit for loginname SLIP unit unit was successfully attached. SEE ALSO
sl(4), slattach(8), syslogd(8) HISTORY
The sliplogin command is currently in beta test. BSD
January 5, 1994 BSD
All times are GMT -4. The time now is 01:37 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy