Sponsored Content
Top Forums Shell Programming and Scripting Help with shell script to run the commands reading options from local file Post 302329579 by itsprout on Monday 29th of June 2009 12:26:31 AM
Old 06-29-2009
Quote:
Originally Posted by bwhitehd
Will the options.txt file be on local or remote host?

BTW, why do you want to modify the default permissions on the websphere subdirectories? If you are running websphere as a non-root user, you should just 'chown -R' the /opt/ibm/websphere directory to that user and leave the default permissions alone. Also, if you're running this on a production host, I definitely would not set the logs directory to 777. This is just inviting a DoS attack or for someone to alter the logs if the system is exploited.

-B
The options file is local, at this time changing the file permissions is just for example purpose, I want to run other commands similar to chmod by reading the options from the local file. If I can get help in this regards it will be great help.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

shell script, reading and resetting local variables

Hello, I have a problem with trying to run a shell script that reads in user input, validates, and sets to a 'default' value if the input is not valid. I cannot get the portion of resetting to a default value to work. These lines are skipped, and the value of x is still whatever the user... (1 Reply)
Discussion started by: b888c
1 Replies

2. Shell Programming and Scripting

How to run unix commands in a new shell inside a shell script?

Hi , I am having one situation in which I need to run some simple unix commands after doing "chroot" command in a shell script. Which in turn creates a new shell. So scenario is that - I need to have one shell script which is ran as a part of crontab - in this shell script I need to do a... (2 Replies)
Discussion started by: hkapil
2 Replies

3. Shell Programming and Scripting

how can I write script that lets me run shell commands?

Hello I want to make simple extension to vi , you know how you want to run some shell command you do ":! ls -l " , then you go out the vi the command executed and then you hit enter and you back to vi but now I want to be able to go out of vi and run several command outside of vi .. and in... (3 Replies)
Discussion started by: umen
3 Replies

4. Shell Programming and Scripting

shell script to run a few commands help!

Hi friends this is first post i am very new to shell scripting so i require your expertise to do the following thank u I need to write a shell script which will run the following commands pg_dump bank > backup(Enter) Wait for bash prompt to appear coz it indicates that the command is... (23 Replies)
Discussion started by: perk_bud
23 Replies

5. Shell Programming and Scripting

Run a shell script from one host which connext to remote host and run the commands

I want to write a script which would run from one host say A and connect to other remote host B and then run rest of commands in that host. I tried connecting from A host to B with SSH but after connecting to host B it just getting me inside Host B command prompt. Rest of the script is not running... (6 Replies)
Discussion started by: SN2009
6 Replies

6. Shell Programming and Scripting

shell script to run commands in different terminals

hi, how to write shell script that runs different commands(like:ls,ps,ls-l) in differnt terminals(each command should run in different terminal). my main motive is to run different 'c' program exe's available in different locations in different terminals. thanks sai (2 Replies)
Discussion started by: saidopdf
2 Replies

7. UNIX for Dummies Questions & Answers

Commands to run from shell script

Hi script> isumid 98765432 if i give above command in cmd prompt it is running the same thing if i give inside the shell script it is not working below is the code #!/bin/bash isumid 98765432 please give me a solution (16 Replies)
Discussion started by: Ramrangasamy
16 Replies

8. Shell Programming and Scripting

To run a local shell script in a remote machine by passing arguments to the local shell script

I need to run a local shell script on a remote machine. I am able to achieve that by executing the command > ssh -qtt user@host < test.sh However, when I try to pass arguments to test.sh it fails. Any pointers would be appreciated. (7 Replies)
Discussion started by: Sree10
7 Replies

9. Shell Programming and Scripting

Except script to run a local shell script on remote server using root access

local script: cat > first.sh cd /tmp echo $PWD echo `whoami` cd /tmp/123 tar -cvf 789.tar 456 sleep 10 except script: cat > first #!/usr/bin/expect set ip 10.5.15.20 set user "xyz123" set password "123456" set script first.sh spawn sh -c "ssh $user@$ip bash < $script" (1 Reply)
Discussion started by: Aditya Avanth
1 Replies

10. Shell Programming and Scripting

Shell script run in a case statement call to run a php file, also Perl

Linux System having all Perl, Python, PHP (and Ruby) installed From a Shell script, can call a Perl, Python, PHP (or Ruby ?) file eg eg a Shell script run in a case statement call to run a php file, also Perl or/and Python file??? Like #!/usr/bin/bash .... .... case $INPUT_STRING... (1 Reply)
Discussion started by: hoyanet
1 Replies
Permissions(4)						     Kernel Interfaces Manual						    Permissions(4)

NAME
Permissions - Contains information about the permissions that remote computers have with respect to login, file access, and command execu- tion SYNOPSIS
/usr/lib/uucp/Permissions DESCRIPTION
The /usr/lib/uucp/Permissions file contains information about the ways in which the remote computers listed in the Systems file are allowed to carry out uucico and uuxqt transactions with a local system. Be aware that entries in a Permissions file do not affect a remote system user with a valid login on the local computer. Note that you must have root user authority to edit the Permissions file, which is owned by the uucp login ID. The Permissions file has two types of entries: LOGNAME specifies the permissions that take effect when a remote system logs in. These entries begin with LOGNAME. MACHINE specifies permissions that take effect when your system calls a remote system. These entries begin with MACHINE. Both type of entries consist of option-value pairs. You can have as many of these option-value pairs as you want and can write entries for all or only some of the remote sites. Options Specifies whether the remote system can request to set up file transfers from your system. The default is not to allow such requests. This option can be used in either LOGNAME or MACHINE entries. Specifies whether your system can send the work queued for the remote system when the remote system initiates the call. The default is call; that is, the queued files are sent only when the local system calls the remote system. This option is used in LOGNAME entries. Spec- ifies from which directories uucico can read. The default is the /usr/spool/uucppublic directory. This option can be used in either LOGNAME or MACHINE entries. If multiple pathnames are specified, separate them with a colon (:). Specifies to which directories uucico can write. The default is the /usr/spool/uucpublic directory. This option can be used in either LOGNAME or MACHINE entries. If multiple pathnames are specified, separate them with a colon (:). Specify exceptions to the READ and WRITE options. These options can be used in either LOGNAME or MACHINE entries. If multiple pathnames are specified, separate them with a colon (:). Specifies the commands that a remote system can request to be executed on the local system. The default is rmail command. If multiple commands are specified, separate them with a colon(:). This option is used in MACHINE entries. Specifies whether any transactions can occur without the local system calling the remote system. The default is no, that is, the local system must initiate the call to the remote system before any transactions are allowed. If both the remote and local systems use CALLBACK, they will not be able to initiate any jobs. This option can be used in LOGNAME entries. Used to verify the calling system's identity. The values for this option should be the system name or the names of systems allowed to log in using the name specified by LOGNAME. If a system other than those specified in VALIDATE tries to use the name specified by LOGNAME, the connection will be refused. If multiple systems are specified, separate them with a colon (:). This option is used with the LOGNAME entries. Rules for Writing Permissions File Entries The following rules apply for writing Permissions file entries: Each option-value pair has the following format: option=value Blank spaces are not allowed before or after the equal sign. A blank space is used to separate option-value pairs. If an option has one or more values, the values are separated with a colon. Comment lines begin with a number sign (#) and end with a new line. The backslash () is used as a continuation character to continue a line on to the next line on the screen. Blank lines are ignored. All login IDs used by remote systems must appear in one and only one LOGNAME entry. If you do not want to grant permissions to each system by name, the entry MACHINE=OTHER will assign permissions to any system not mentioned by name. You can combine MACHINE and LOGNAME entries into a single entry if the options are the same. EXAMPLES
The following example allows remote system buck to log in with login ID Luucp1. The VALIDATE option means that the login ID uucp1 can only be used by remote system buck. The REQUEST option means that remote system buck can request files to be transferred from the local system. The SENDFILES option means that any requests queued on the local system for work on the remote system will be sent to the remote system during the current session if allowed by remote system buck. The READ and WRITE options mean that remote system can read and write from and to any directory that has proper permissions. LOGNAME=uucp1 REQUEST=yes SENDFILES=yes VALIDATE=buck READ=/ WRITE=/ MACHINE=buck REQUEST=yes COMMANDS=ALL READ=/ WRITE=/ The following example has all the default values of the options, which are as follows: REQUEST=no, SENDFILES=call READ and WRITE=/usr/spool/uucppublic COMMANDS=rmail CALLBACK=no The remote system cannot ask to receive any queued files containing work that users on the local system have requested to be exe- cuted on the remote system. The local system cannot send queued work to the remote system when that system has completed its current operations. Instead, the queued work can be sent only when the local system contacts the remote system. The remote system can send (write) files to and transfer (read) files from only the uucp public directory (/usr/spool/uucppublic/system_name) on the local sys- tem. Users on the remote system can execute only the default command (rmail) on the local system. LOGNAME=uucp2 MACHINE=buck:bigguy The following example is similar to the first. However, this entry allows the remote users of sys- tems waldo and buck to execute only the rmail and /usr/lbin/rnews commands: LOGNAME=uucp3 VALIDATE=waldo:buck REQUEST=yes SENDFILES=yes READ=/ WRITE=/ MACHINE=waldo:buck REQUEST=yes COM- MANDS=rmail:/usr/lbin/rnews READ=/ WRITE= The following example specifies that all remote systems using the uucp4 login ID that are not included in existing MACHINE entries can execute the rmail (mail) and /usr/bin/lint commands on the local system: LOGNAME=uucp4 MACHINE=OTHER COMMANDS=rmail:/usr/bin/lint The following example shows how the MACHINE and LOGNAME entry can be com- bined into one entry. The remote host is darla. The remote system darla should use the login ID xuucp to log in to local system. The rest of the options have the same meaning as explained in the first example. MACHINE=darla LOGNAME=xuucp READ=/ WRITE=/ REQUEST=yes SENDFILES=yes FILES
Contains all the configuration files for the UNIX-to-UNIX Copy Program (UUCP), including the Devices file. Describes accessible remote systems. RELATED INFORMATION
Files: Systems(4) delim off Permissions(4)
All times are GMT -4. The time now is 04:09 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy