Operating System - HP-UX
1846310 Members
3724 Online
110256 Solutions
New Discussion

LAN Administration - Reset

 
Mauro_3
Advisor

LAN Administration - Reset

I have a problem, sometimes I have to reset the lan interface using lanadmin as root, but I want to do a script and run it as another user that do not have the same rights as root. Once more problem is the lanadmin command is a interactive command and there is not a option like lanadmin -r to reset the lan interface and self-test, so I?m lost... if someone has a advice I would like it. Bye
3 REPLIES 3
Alexander M. Ermes
Honored Contributor

Re: LAN Administration - Reset

Hi there.
lanadmin can be run in menu mode or in immediate mode. Pls check the manpages.
Your commd should look like this :
lanadmin PPA 3 -a reset or so.
I do not exactly know how.
Rgds
Alexander MN. Ermes
.. and all these memories are going to vanish like tears in the rain! final words from Rutger Hauer in "Blade Runner"
Patrick Wallek
Honored Contributor

Re: LAN Administration - Reset

I would do something like this:

#!/usr/bin/sh
lanadmin << EOF
lan
reset
quit
EOF
Herve BRANGIER
Respected Contributor

Re: LAN Administration - Reset

Hi

I think that you can't reset lan interface
without being root, but you can use sudo to do
that : http://www.courtesan.com/sudo/ . With
sudo you can get root rigths for some commands.

Think that Patrick gave you the way to use
interactive mode in a script... But for some
commands (display for example) you need to
insert some "return" like if you were in
interactive mode.

HTH

Herv?