Re: rsh problem - "password expired" message

From: Carlos J. G. Duarte (cjgd_at_clix.pt)
Date: 02/20/04


Date: Fri, 20 Feb 2004 02:26:42 +0000

tvr wrote:

> I have created .rhosts files in both the accounts and entered
> the servername and passwords in them.

Hum? Say what? Put the servername and USERNAME in them.

>
> Is there any other way to execute a command as another user?
>

(1)$ su -c 'command' user
(2)$ sudo -u user command

(3)
[as root]
chmod u+s command
chown user command
[as other_user]
./command

You can also use ssh as you are using rsh. I've no idea why is rsh
complaining about passwd and you still can login as that user...

-- 
carlos ** http://cgd.sdf-eu.org


Relevant Pages

  • Re: Exec and rsh
    ... I figured out the rsh part. ... I ran system (ssh server-Y exec ./a.out) from my server-X. ... execute some file on server-X directly in the above command. ...
    (comp.unix.programmer)
  • Re: [PHP] run a command on a remote host
    ... Hopefully that's not root in this case. ... docs for rsh, you can specify the username with the -l option. ... > How can I run a command on a remote host wiht php? ...
    (php.general)
  • Expect and rsh
    ... I have an expect script that I use to telnet into a remote machine ... to execute unix commands. ... For example, myscript takes a command, "-c", and executes it on ... When I do an rsh to a third machine, mach2, via mach1, I get ...
    (comp.lang.perl.modules)
  • Re: Execute commands remotely and get its result
    ... What services should that remote host should run to provide the remsh ... or rsh connection? ... If I telnetto the remote host from my local terminal and execute a ... command, the command doesn't be executed remotely, right? ...
    (comp.unix.shell)
  • Execute commands remotely and get its result
    ... What services should that remote host should run to provide the remsh ... or rsh connection? ... If I telnetto the remote host from my local terminal and execute a ... command, the command doesn't be executed remotely, right? ...
    (comp.unix.shell)