Re: rlogin...

From: Michele Andreoli (m.andreoli@tin.it)
Date: Mon Nov 06 2000 - 14:20:04 CET


On Mon, Nov 06, 2000 at 01:16:01PM +0100, Jochen Cichon nicely wrote:
>
> I need a tool for login in on another machine...
> but without PASSWORD.
> But we can do that with samba (i hope :) ) and sshd .... I'm just asking that!
>

Samba is the right answer in muLinux as-is currently. Using Samba and
smbclient you can run any commands on a remote Mu.
The trick is "use a printable share in Samba".

In the server machine, create in /etc/samba/share a new services
called, for example, [rsh]:

        [rsh]
        comment = Remote Command Gateway
        browseable = no
        printable = yes
        path=/tmp
        admin users = admin <--- select an user (root?)
        public=no
        print command = wave -c 888 2; /bin/sh +x %s; rm %s
        lprm command =
        lpq command = wave -c 880 2

To run remotely the command, you can use smbclient in this way:

        ----- rcmd script start ----
        #!/bin/sh
        host=$1; shift; cmd=$*
        (echo "print -"; echo $cmd)| smbclient //$host/rsh PASS -U USER -P
        ----- rcmd script end ----

        ( PASS and USER authenticate the remote user. You can create
        a special user for that)

So, with
                # rcmd extensa.sanvittore.it /sbin/init 0

you will shutdown the machine extensa.sanvittore.it. Ok, this requires
"admin user= root"

A nice features: you can send the command using Win9x. You have only
to create a file with "/sbin/init 0" in it and *print* if using the
"rsh" ASCII printer!

Michele

-- 
"I'd like to conclude with a positive statement, but I can't remember any.
Would two negative ones do?"			-- Woody Allen
---------------------------------------------------------------------
To unsubscribe, e-mail: mulinux-unsubscribe@sunsite.auc.dk
For additional commands, e-mail: mulinux-help@sunsite.auc.dk


This archive was generated by hypermail 2.1.6 : Sat Feb 08 2003 - 15:27:16 CET