Sponsored Content
Top Forums Shell Programming and Scripting login into root from user and execute command through script Post 302230296 by pradeepreddy on Friday 29th of August 2008 02:46:58 AM
Old 08-29-2008
can u explain in detail
 

10 More Discussions You Might Find Interesting

1. SCO

Executing script with root privilages from a user login

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

shell script to execute user command

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

root user command in shell script execute as normal user

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

Execute Root command as Normal user

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

Can not login with root user

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

How to Login as another user through Shell script from current user[Not Root]

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

Execute a command as root from normal user

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

Script for login to servers with user name and password and execute commands

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

Execute a command with root user

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

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
SRU::Server(3pm)					User Contributed Perl Documentation					  SRU::Server(3pm)

NAME
SRU::Server - respond to SRU requests via CGI::Application SYNOPSIS
package MySRU; use base qw( SRU::Server ); sub explain { my $self = shift; # $self->request isa SRU::Request::Explain # $self->response isa SRU::Response::Explain } sub scan { my $self = shift; # $self->request isa SRU::Request::Scan # $self->response isa SRU::Response::Scan # $self->cql is the root node of a CQL::Parser-parsed query } sub searchRetrieve { my $self = shift; # $self->request isa SRU::Request::SearchRetrieve # $self->response isa SRU::Response::SearchRetrieve # $self->cql is the root node of a CQL::Parser-parsed query } package main; MySRU->new->run; DESCRIPTION
This module brings together all of the SRU verbs (explain, scan and searchRetrieve) under a sub-classable object based on CGI::Application. METHODS
explain This method is used to return an explain response. It is the default method. scan This method returns a scan response. searchRetrieve This method returns a searchRetrieve response. CGI
::APPLICATION METHODS setup Sets the "run_modes", "mode_param" and the default runmode (explain). cgiapp_prerun Parses the incoming SRU request and if needed, checks the CQL query. cgiapp_postrun Sets the content type (text/xml) and serializes the response. error_mode Stub error runmode. AUTHORS
o Brian Cassidy <bricas@cpan.org> o Ed Summers <ehs@pobox.com> perl v5.12.4 2009-11-20 SRU::Server(3pm)
All times are GMT -4. The time now is 02:47 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy