someody help me out

Ajay Dangol (ajay.dangol@parijat.info.com.np)
Wed, 2 May 2001 10:56:34 +0545 (NPT)


Hello all,
I am just a beginner in linux programming and I want to write a
script for disconnecting users in cisco router.Could anybody help me out.
The scenario is like this. I have been using Cisco router2500
and in that we have users connected to it in async port.

when I execute the command.

Router#sh users

I will get something like this

Line User Host(s) Idle location

1 tty 1 user async interface dial-up for ISP

now if i execute the command

Router#clear line 1

the "user" will be disconnected from the router.

Now what I want is to write a script that will disconnect the
user from the router.

When you telnet to the router the process goes like this

telnet ip address

then it will ask for
password:

then you get something like this

router>en (you have to type en to enable it)

then again it asks for password

password:

once you give the password

Router#show users (you have to execute the following command)

then if you want to disconnect particular user then you give command

Router#clear line 1

how do i put the whole thing in a script and achieve the above .Could anybody
help me out.

Thanking you,
Ajay Dangol.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/