1830697 Members
2303 Online
110015 Solutions
New Discussion

remsh, then su to root

 
Donny Jekels
Respected Contributor

remsh, then su to root

I have a need to su to root, inside some scripts.

anyone done something like this before??
"Vision, is the art of seeing the invisible"
3 REPLIES 3
John Bolene
Honored Contributor

Re: remsh, then su to root

su to root on your local machine before remsh to the remote machine
It is always a good day when you are launching rockets! http://tripolioklahoma.org, Mostly Missiles http://mostlymissiles.com
Donny Jekels
Respected Contributor

Re: remsh, then su to root

sorry, forgot to add. root cannot remsh.

/etc/profile looks for "console" in tty. if not console, connection is dropped.
"Vision, is the art of seeing the invisible"
Paul Thomson_2
Super Advisor

Re: remsh, then su to root

I have not directly used a su to root, but have made use of a product called sudo, and used this method to execute commands as root.

perhaps
remsh host -n 'sudo /sbin/init.d/XXXXXX start'

or perhaps

remsh host -n shutdown -ry 0

There is loads on sudo on the website.
Argh ye land lovers !