Sponsored Content
Top Forums Shell Programming and Scripting How a normal user run a script including root privileaged commands Post 302277573 by pludi on Friday 16th of January 2009 04:38:09 PM
Old 01-16-2009
Sudo download with prepared binaries. (no 9.x though)
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Other than root user .Normal user is unable to create files

Hi all, I am using Sun Solaris 9 .In this system normal users unable to create files from the command line.I added these users in bin,adm and even root group i found them unable to create a file. (1 Reply)
Discussion started by: mallesh
1 Replies

2. Shell Programming and Scripting

su root from normal user

Got a cron to run everyday under my user. this cronjob runs a script from my /home/jack/scripts/run.sh clear # # su to root and run a script, return with result # su - # passwd # run /getfile.sh # return with result # the result will copy 2 files from /prod/app/logs/ and... (0 Replies)
Discussion started by: karthikn7974
0 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. UNIX for Dummies Questions & Answers

How to allow access to some commands having root privleges to be run bu non root user

hi i am new to unix and i have abig task. i have to \run particular commands having root privileges from a non root user. i know sudo is one of the way but i need sum other approach kindly help Thanks (5 Replies)
Discussion started by: suryashikha
5 Replies

5. Solaris

java version mismatch for normal user and root user

:confused: I installed latest version of java ( jre 1.6) on Solaris Machine ......when I run java -version as root, shows the latest version but when I run java -version as normal user, shows the old / previous version What should I do to fix this ...should show the latest version... (3 Replies)
Discussion started by: frintocf
3 Replies

6. Shell Programming and Scripting

Need to run a bash script that logs on as a non-root user and runs script as root

So I have a script that runs as a non-root user, lets say the username is 'xymon' . This script needs to log on to a remote system as a non-root user also and call up a bash script that runs another bash script as root. in short: user xymon on system A needs to run a file as root user and have... (2 Replies)
Discussion started by: damang111
2 Replies

7. Shell Programming and Scripting

Script to run commands as root user

Hello I have a script which is working fine so far to generate HTML file. Now i am wondering how do i include a syntax where it can change itself to root user and execute a specific commands as root user. Please help, Thanks in advance. -Siddhesh (2 Replies)
Discussion started by: Siddheshk
2 Replies

8. AIX

List of AIX commands that can be run by ROOT user ONLY

Hello, I am testing sudo and I want to test it. Can anyone please let me know few commands (of course other than shutdown, reboot etc. as I can't reboot the box) on AIX that can be run by ROOT only. Thanks ---------- Post updated at 07:43 PM ---------- Previous update was at 07:38 PM... (5 Replies)
Discussion started by: prvnrk
5 Replies

9. UNIX for Dummies Questions & Answers

Switching from root to normal user takes me to user's home dir

Whenever i switch from root to another user, by doing su - user, it takes me to home directory of user. This is very annoying as i want to be in same dir to run different commands as root sometimes and sometimes as normal user. How to fix this? (1 Reply)
Discussion started by: syncmaster
1 Replies

10. Shell Programming and Scripting

Will Chkconfig works for normal user apart from root user

Hi, I am trying to schedule a script that starts on reboot.I came across chkconfig utility to schedule scripts on reboot. Problem here is can i how to use this chkconfig to schedule a script that runs a s normal user. Or if there is any other function to schedule on reboot as normal user... (4 Replies)
Discussion started by: praveena kotapa
4 Replies
Mojo::URL(3pm)						User Contributed Perl Documentation					    Mojo::URL(3pm)

NAME
Mojo::URL - Uniform Resource Locator SYNOPSIS
use Mojo::URL; # Parse my $url = Mojo::URL->new('http://sri:foobar@kraih.com:3000/foo/bar?foo=bar#23'); say $url->scheme; say $url->userinfo; say $url->host; say $url->port; say $url->path; say $url->query; say $url->fragment; # Build my $url = Mojo::URL->new; $url->scheme('http'); $url->userinfo('sri:foobar'); $url->host('kraih.com'); $url->port(3000); $url->path('/foo/bar'); $url->path('baz'); $url->query->param(foo => 'bar'); $url->fragment(23); say $url; DESCRIPTION
Mojo::URL implements a subset of RFC 3986 and RFC 3987 for Uniform Resource Locators with support for IDNA and IRIs. ATTRIBUTES
Mojo::URL implements the following attributes. "authority" my $authority = $url->authority; $url = $url->authority('root:pass%3Bw0rd@localhost:8080'); Authority part of this URL. "base" my $base = $url->base; $url = $url->base(Mojo::URL->new); Base of this URL. "fragment" my $fragment = $url->fragment; $url = $url->fragment('foo'); Fragment part of this URL. "host" my $host = $url->host; $url = $url->host('127.0.0.1'); Host part of this URL. "port" my $port = $url->port; $url = $url->port(8080); Port part of this URL. "scheme" my $scheme = $url->scheme; $url = $url->scheme('http'); Scheme part of this URL. "userinfo" my $userinfo = $url->userinfo; $url = $url->userinfo('root:pass%3Bw0rd'); Userinfo part of this URL. METHODS
Mojo::URL inherits all methods from Mojo::Base and implements the following new ones. "new" my $url = Mojo::URL->new; my $url = Mojo::URL->new('http://127.0.0.1:3000/foo?f=b&baz=2#foo'); Construct a new Mojo::URL object. "clone" my $url2 = $url->clone; Clone this URL. "ihost" my $ihost = $url->ihost; $url = $url->ihost('xn--bcher-kva.ch'); Host part of this URL in punycode format. # "xn--da5b0n.net" Mojo::URL->new('http://X.net')->ihost; "is_abs" my $success = $url->is_abs; Check if URL is absolute. "parse" $url = $url->parse('http://127.0.0.1:3000/foo/bar?fo=o&baz=23#foo'); Parse URL. "path" my $path = $url->path; $url = $url->path('/foo/bar'); $url = $url->path('foo/bar'); $url = $url->path(Mojo::Path->new); Path part of this URL, relative paths will be appended to the existing path, defaults to a Mojo::Path object. # "http://mojolicio.us/DOM/HTML" Mojo::URL->new('http://mojolicio.us/perldoc/Mojo')->path('/DOM/HTML'); # "http://mojolicio.us/perldoc/DOM/HTML" Mojo::URL->new('http://mojolicio.us/perldoc/Mojo')->path('DOM/HTML'); # "http://mojolicio.us/perldoc/Mojo/DOM/HTML" Mojo::URL->new('http://mojolicio.us/perldoc/Mojo/')->path('DOM/HTML'); "query" my $query = $url->query; $url = $url->query(replace => 'with'); $url = $url->query([merge => 'with']); $url = $url->query({append => 'to'}); $url = $url->query(Mojo::Parameters->new); Query part of this URL, defaults to a Mojo::Parameters object. # "2" Mojo::URL->new('http://mojolicio.us?a=1&b=2')->query->param('b'); # "http://mojolicio.us?a=2&c=3" Mojo::URL->new('http://mojolicio.us?a=1&b=2')->query(a => 2, c => 3); # "http://mojolicio.us?a=2&b=2&c=3" Mojo::URL->new('http://mojolicio.us?a=1&b=2')->query([a => 2, c => 3]); # "http://mojolicio.us?b=2" Mojo::URL->new('http://mojolicio.us?a=1&b=2')->query([a => undef]); # "http://mojolicio.us?a=1&b=2&a=2&c=3" Mojo::URL->new('http://mojolicio.us?a=1&b=2')->query({a => 2, c => 3}); "to_abs" my $abs = $url->to_abs; my $abs = $url->to_abs(Mojo::URL->new('http://kraih.com/foo')); Clone relative URL and turn it into an absolute one. "to_rel" my $rel = $url->to_rel; my $rel = $url->to_rel(Mojo::URL->new('http://kraih.com/foo')); Clone absolute URL and turn it into a relative one. "to_string" my $string = $url->to_string; Turn URL into a string. SEE ALSO
Mojolicious, Mojolicious::Guides, <http://mojolicio.us>. perl v5.14.2 2012-09-05 Mojo::URL(3pm)
All times are GMT -4. The time now is 10:40 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy