![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| execute a command silently or quietly within a shell | lumix | Shell Programming and Scripting | 4 | 12-15-2007 12:10 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
become SU - ...Silently
Hi,
One more question guys.... I need to become "su " during a script and then execute a script and then exit back and become the normal user. How can this be done ? |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
Code:
remsh host [-l username] [-n] command |
|
#3
|
|||
|
|||
|
It says " Permission denied "
Do i need to set some environment for this ? Thanks |
|
#4
|
|||
|
|||
|
This is what i did :
remsh localhost[-l root] [-n] <some command> and i got permission denied. |
|
#5
|
||||
|
||||
|
Yes , u have to touch /etc/hosts as root
See de man pages of remsh and rlogin for more.. Cheers |
|
#6
|
|||
|
|||
|
what will "touch /etc/hosts" as root do ?
Pardon my ignorance please, but i really did not get that part. Dont I have to provide the root password some where in this command ? remsh localhost[-l root] [-n] <some command> And since i need to su to my localmachine, is the localhost mentioned in the command appropriate ? Thanks |
|
#7
|
||||
|
||||
|
Sorry , i was trying to explain that you have to modify the /etc/hosts (don“t touch it) for authentication as root using remsh ...
|
||||
| Google The UNIX and Linux Forums |