1828676 Members
2220 Online
109984 Solutions
New Discussion

rexec command

 
bashnaini_1
New Member

rexec command

I have 2 HP B2000 workstation ws1 and ws2
i am using shutdown.allow file to allow user1 to shutdown ws1 from ws2 using the command:
rexec ws1 /sbin/shutdown -r -y 0
It works fine .
also, I would like to allow user1 to shutdown ws2 from ws2 ( shutdown ws2 that he is logged on ) using the command:
rexec ws2 /sbin/shutdown -r -y 0
the system will go to run level 3 ( and stay there ) and will not be rebooted as expected .

Any one could help on this issue , I ppretiate.
regds.
5 REPLIES 5
Robert-Jan Goossens
Honored Contributor

Re: rexec command

Hi,

check on ws2 the /etc/shutdown.allow if user1 is allowed to shutdown the ws.

Regards,

Robert-Jan.
bashnaini_1
New Member

Re: rexec command

on ws2 user1 is allowed to shutdown the machine : the file /etc/shutdown.allow has user1 .
regds.
Stanimir
Trusted Contributor

Re: rexec command

Hi!
You can try normal shutdown by user1 without
"rexec" at first time. You can try "reboot".
What is the result?
May be you dont need "rexec"?
Regards,Stan
Robert-Jan Goossens
Honored Contributor

Re: rexec command

Hi,

well it sound a bit strange but if you add "ws2 user1" to the local .rhosts file of user1, it will problably work.

If you don't like to add this to his homedir just give the command without the rexec
# /sbin/shutdown -r -y 0

Robert-Jan.
bashnaini_1
New Member

Re: rexec command

I have to use rexec. I am using dtwmrc file to give the user menu he can select any workstation to shutdown and reboot it.
so, if he tried from any ws to shutdown another ws this is working fine but if he tried to shutdown and reboot ( -r ) his own ws that he is logged on this will bring him to run level 3 .
this is part of dtwmrc file i am using.
I have 25 workstation:

"10.20.1.34" f.exec "dtterm -e rexec ws1 /sbin/shutdown -r -y 0'"
"10.20.1.36" f.exec "dtterm -e rexec ws2 /sbin/shutdown -r -y 0'"
"10.20.1.37" f.exec "dtterm -e rexec ws3 /sbin/shutdown -r -y 0'"
"10.20.1.38" f.exec "dtterm -e rexec ws4 /sbin/shutdown -r -y 0'"
"10.20.1.43" f.exec "dtterm -e rexec ws5 /sbin/shutdown -r -y 0'"
"10.20.1.44" f.exec "dtterm -e rexec ws6 /sbin/shutdown -r -y 0'"

the user can shutdown any of these ws but if tried to shutdown his own ws that he is logged on it will go to run level 3.

regds.