08-29-2008
$ cat myscript.ksh
ssh -l root HOSTNAME
echo "WELCOME to ROOT"
<do your stuff>
exit
$ sh myscript.ksh >> myscript.log
Will prompt for the password of root and you have to give manually.
10 More Discussions You Might Find Interesting
1. SCO
I need to regular users to be able to launch a script which does something requiring root privilages. I've tried using chmod 4755 which gives it
-rwsr-xr-x permissions but it still can not be run as the regular user. (1 Reply)
Discussion started by: checkpro
1 Replies
2. Shell Programming and Scripting
I don't know why the following shell script doesn't work. Could you please help me out?
#!/usr/bin/ksh
test="cal > /tmp/tmp.txt 2>&1"
$test
I know it will work for the following format:
#!/usr/bin/ksh
cal > /tmp/tmp.txt 2>&1
However, I need to get the command from the user in... (1 Reply)
Discussion started by: redtiger
1 Replies
3. Shell Programming and Scripting
Hi All
I have written one shell script for GPRS route add is given below named GPRSRouteSet.sh
URL="www.google.com"
VBURL="10.5.2.211"
echo "Setting route for $URL for GPRS"
URL_Address=`nslookup $URL|grep Address:|grep -v "#"|awk -F " " '{print $2}'|head -1`
echo "Executing ... (3 Replies)
Discussion started by: mnmonu
3 Replies
4. Shell Programming and Scripting
Hi,
We need to execute a root commmand to change the expiry period of a user but we are getting error as permission denied
Q How can we execute a root command by a normal user ? :mad:
any thing or suggestion will be good .... :b: (3 Replies)
Discussion started by: abhishek1979
3 Replies
5. UNIX for Dummies Questions & Answers
Hi folks.
our developer had a root user and he changed some settings about root user. We have not known what he changed.
There is an oracle user, we can login to oracle, no problem. But when we try to login to root user we are getting this error :
$ su root
Password:
bash:... (9 Replies)
Discussion started by: futi
9 Replies
6. Shell Programming and Scripting
Hi Every body,
I would need a shell script program to login as different user and perform some copy commands in the script.
example: Supppose ora_toms is the active user
ora_toms should be able to run a script where user: ftptomsp pass: XXX should login through and run the commands
... (9 Replies)
Discussion started by: ujjwal27
9 Replies
7. UNIX for Dummies Questions & Answers
Hi ,
I am trying to stop and start a process using the below code. I have sudo access on my machine
## PID = process id
echo "$PASSWD" | sudo -S kill -9 <PID>
echo "$PASSWD" | sudo -S /opt/abc/startserver
/opt/abc/startserver: error while loading shared libraries: librts.so: cannot open... (6 Replies)
Discussion started by: rakeshkumar
6 Replies
8. Shell Programming and Scripting
I am having the 15 servers which need to do the monitoring
Hi I need a shell script, By which i can log in to multiple servers and execute the commands.. I need to specify the username and password in the scripts.
Please help me to write the script so that it can login with username and... (5 Replies)
Discussion started by: nandan8a
5 Replies
9. Shell Programming and Scripting
i m logged in with user1 id.
i wish to execute the below as root user for which i tried several commands but all of them fail.
sudo 'cat /tmp/tmp.file >>/etc/logger'
Password:
sudo: cat /tmp/tmp.file >>/etc/logger: command not found
sudo cat /tmp/tmp.file >>/etc/logger
bash:... (5 Replies)
Discussion started by: mohtashims
5 Replies
10. Shell Programming and Scripting
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
YAPP(1) User Contributed Perl Documentation YAPP(1)
NAME
yapp - A perl frontend to the Parse::Yapp module
SYNOPSYS
yapp [options] grammar[.yp]
yapp -V
yapp -h
DESCRIPTION
yapp is a frontend to the Parse::Yapp module, which lets you compile Parse::Yapp grammar input files into Perl LALR(1) OO parser modules.
OPTIONS
Options, as of today, are all optionals :-)
-v Creates a file grammar.output describing your parser. It will show you a summary of conflicts, rules, the DFA (Deterministic Finite
Automaton) states and overall usage of the parser.
-s Create a standalone module in which the driver is included. Note that if you have more than one parser module called from a program,
to have it standalone, you need this option only for one of your parser module.
-n Disable source file line numbering embedded in your parser module. I don't know why one should need it, but it's there.
-m module
Gives your parser module the package name (or name space or module name or class name or whatever-you-call-it) of module. It defaults
to grammar
-o outfile
The compiled output file will be named outfile for your parser module. It defaults to grammar.pm or, if you specified the option -m
A::Module::Name (see below), to Name.pm.
-t filename
The -t filename option allows you to specify a file which should be used as template for generating the parser output. The default is
to use the internal template defined in Parse::Yapp::Output.pm. For how to write your own template and which substitutions are
available, have a look to the module Parse::Yapp::Output.pm : it should be obvious.
-b shebang
If you work on systems that understand so called shebangs, and your generated parser is directly an executable script, you can specifie
one with the -b option, ie:
yapp -b '/usr/local/bin/perl -w' -o myscript.pl myscript.yp
This will output a file called myscript.pl whose very first line is:
#!/usr/local/bin/perl -w
The argument is mandatory, but if you specify an empty string, the value of $Config{perlpath} will be used instead.
grammar
The input grammar file. If no suffix is given, and the file does not exists, an attempt to open the file with a suffix of .yp is tried
before exiting.
-V Display current version of Parse::Yapp and gracefully exits.
-h Display the usage screen.
BUGS
None known now :-)
AUTHOR
Francois Desarmenien <francois@fdesar.net>
COPYRIGHT
(c) Copyright 1998-1999 Francois Desarmenien, all rights reserved. See Parse::Yapp(3) for legal use and distribution rights
SEE ALSO
Parse::Yapp(3) Perl(1) yacc(1) bison(1)
perl v5.12.1 2001-02-11 YAPP(1)