[prev in list] [next in list] [prev in thread] [next in thread] 

List:       dhcp-users
Subject:    =?utf-8?B?UmXvvJogUmU6IFJlbW92ZSBMZWFzZSB2aWEgb21zaGVsbA==?=
From:       Billy Ng <mondeo1055 () yahoo ! com>
Date:       2009-12-29 2:25:17
Message-ID: 429211.73859.qm () web54409 ! mail ! re2 ! yahoo ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Dear All,

When I tried to remove the lease from omshell by:

omshell
> server localhost
> port 7911
> key my_key xxxxxx
> new host
> set name = "HOSTNAME"   
(where the HOSTNAME is the client-hostname listed in the dhcpd.lease)
> open
can't open object: not found
obj: host
name = "HOSTNAME"
> remove
can't destroy object: not found
obj: host
name = "HOSTNAME"

Any idea?

Best Regards,
Billy



________________________________
寄件人﹕ Glenn Satchell <Glenn.Satchell@uniq.com.au>
收件人﹕ dhcp-users@lists.isc.org
傳送日期﹕ 2009/12/7 (一) 7:24:05 PM
主題: Re:Re: Remove Lease via omshell

They are in /etc/dhcpd.conf, so you could either hard code them in your
script, or use some grep and cut to extract them from dhcpd.conf into
shell variables which you plug into your omshell command line.

Something like this:

#! /bin/sh
PORT=`grep port /etc/dhcpd.conf | cut -f2 | sed -e 's/;//'`
# repeat for other vars like secret and keyname

omshell << EOF
server localhost
port $PORT
key $keyname $secret
connect
new host
set name = "hostname"
open
remove
EOF

regards,
-glenn

> Date: Mon, 7 Dec 2009 18:59:15 +0800 (CST)
> From: syhshanda <syhshanda@126.com>
> 
> Hi,
> In the command line of "key keyname secret", how can I get the keyname and 
secret.
> Thanks for you help.
> Best Regards,
> Bob
> 
> 
> 
> 
> 
> 
> 婓2009-12-07?12:07:25ㄛApu?<apu@spfld.com>?迡耋ㄩ
> > On?12/6/09?10:30?PM,?Billy?Ng?wrote:
> > > ?Is?it?possible?to?remove?a?lease?via?omshell??If?yes,?would?you
> > > ?please?kindly?advise?the?syntax?of?omshell??Thanks?a?lot.
> > 
> > 
> > server?localhost
> > port?7911
> > key?keyname?secret
> > connect
> > new?host
> > set?name?=?"hostname"
> > open
> > remove
> > 
> > 
> > --?
> > Apu?<apu@spfld.com>
> > http://www.spfld.com/
> > 
> > 
> > _______________________________________________
> > dhcp-users?mailing?list
> > dhcp-users@lists.isc.org
> > https://lists.isc.org/mailman/listinfo/dhcp-users

_______________________________________________
dhcp-users mailing list
dhcp-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/dhcp-users



      Yahoo!香港提供網上安全攻略,教 如何防範黑客! 請前往 \
http://hk.promo.yahoo.com/security/ 了解更多!


[Attachment #5 (text/html)]

<html><head><style type="text/css"><!-- DIV {margin:0px;} \
--></style></head><body><div style="font-family:arial, helvetica, \
sans-serif;font-size:13pt"><div><span class="Apple-style-span" style="font-size: \
small;">Dear All,</span></div><div><span class="Apple-style-span" style="font-size: \
small;"><br></span></div><div><span class="Apple-style-span" style="font-size: \
small;">When I tried to remove the lease from omshell by:</span></div><div><font \
class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: \
13px;"><br></span></font></div><div><font class="Apple-style-span" size="3"><span \
class="Apple-style-span" style="font-size: \
13px;">omshell</span></font></div><div><font class="Apple-style-span" size="3"><span \
class="Apple-style-span" style="font-size: 13px;">>server \
localhost</span></font></div><div><font class="Apple-style-span" size="3"><span \
class="Apple-style-span" style="font-size: 13px;">>port  \
7911</span></font></div><div><font class="Apple-style-span" size="3"><span \
class="Apple-style-span" style="font-size: 13px;">>key my_key \
xxxxxx</span></font></div><div><font class="Apple-style-span" size="3"><span \
class="Apple-style-span" style="font-size: 13px;">>new \
host</span></font></div><div><font class="Apple-style-span" size="3"><span \
class="Apple-style-span" style="font-size: 13px;">>set name = "HOSTNAME"     \
</span></font></div><div><font class="Apple-style-span" size="3"><span \
class="Apple-style-span" style="font-size: 13px;"><span class="Apple-tab-span" \
style="white-space:pre">	</span>(where the HOSTNAME is the client-hostname listed in \
the dhcpd.lease)</span></font></div><div><font class="Apple-style-span" \
size="3"><span class="Apple-style-span" style="font-size: \
13px;">>open</span></font></div><div><span class="Apple-style-span" style="font-size: \
13px; ">can't open object: not found</span></div><div><font class="Apple-style-span"  \
size="3"><span class="Apple-style-span" style="font-size: 13px;"><div>obj: \
host</div><div>name = "HOSTNAME"</div><div><div>>remove</div><div>can't destroy \
object: not found</div><div>obj: host</div><div>name = \
"HOSTNAME"</div></div><div><br></div><div>Any idea?</div><div><br></div><div>Best \
Regards,</div><div>Billy</div></span></font></div><div style="font-family:arial, \
helvetica, sans-serif;font-size:13pt"><br><div style="font-family:arial, helvetica, \
sans-serif;font-size:13px"><font size="2" face="Tahoma"><hr size="1"><b><span \
style="font-weight: bold;">寄件人﹕</span></b> Glenn Satchell \
&lt;Glenn.Satchell@uniq.com.au><br><b><span style="font-weight: \
bold;">收件人﹕</span></b> dhcp-users@lists.isc.org<br><b><span \
style="font-weight: bold;">傳送日期﹕</span></b> 2009/12/7 (一) 7:24:05 \
PM<br><b><span style="font-weight: bold;">主題:</span></b> Re:Re: Remove Lease \
via omshell<br></font><br>They are in /etc/dhcpd.conf, so you could  either hard code \
them in your<br>script, or use some grep and cut to extract them from dhcpd.conf \
into<br>shell variables which you plug into your omshell command \
line.<br><br>Something like this:<br><br>#! /bin/sh<br>PORT=`grep port \
/etc/dhcpd.conf | cut -f2 | sed -e 's/;//'`<br># repeat for other vars like secret \
and keyname<br><br>omshell &lt;&lt; EOF<br>server localhost<br>port $PORT<br>key \
$keyname $secret<br>connect<br>new host<br>set name = \
"hostname"<br>open<br>remove<br>EOF<br><br>regards,<br>-glenn<br><br>>Date: Mon, 7 \
Dec 2009 18:59:15 +0800 (CST)<br>>From: syhshanda &lt;<a \
ymailto="mailto:syhshanda@126.com" \
href="mailto:syhshanda@126.com">syhshanda@126.com</a>><br>><br>> Hi,<br>>   In the \
command line of "key keyname secret", how can I get the keyname and <br>secret.<br>>  \
Thanks for you help.<br>> Best Regards,<br>> Bob<br>> <br>> <br>> <br>> <br>> <br>> \
<br>> 婓2009-12-07?12:07:25ㄛApu?&lt;<a ymailto="mailto:apu@spfld.com"  \
href="mailto:apu@spfld.com">apu@spfld.com</a>>?迡耋ㄩ<br>> \
>On?12/6/09?10:30?PM,?Billy?Ng?wrote:<br>> \
> >>?Is?it?possible?to?remove?a?lease?via?omshell??If?yes,?would?you<br>> \
> > > >>?please?kindly?advise?the?syntax?of?omshell??Thanks?a?lot.<br>> ><br>> ><br>> \
> > > > > >       server?localhost<br>> >       port?7911<br>> >       \
> > > > > > key?keyname?secret<br>> >       connect<br>> >       new?host<br>> >      \
> > > > > > set?name?=?"hostname"<br>> >       open<br>> >       remove<br>> ><br>> \
> > > > > > ><br>> >--?<br>> >Apu?&lt;<a ymailto="mailto:apu@spfld.com" \
> > > > > > > href="mailto:apu@spfld.com">apu@spfld.com</a>><br>> ><a \
> > > > > > > href="http://www.spfld.com/" \
> > > > > > > target="_blank">http://www.spfld.com/</a><br>> ><br>> ><br>> \
> > > > > > > >_______________________________________________<br>> \
> > > > > > > > >dhcp-users?mailing?list<br>> ><a \
> > > > > > > > > ymailto="mailto:dhcp-users@lists.isc.org" \
> > > > > > > > > href="mailto:dhcp-users@lists.isc.org">dhcp-users@lists.isc.org</a><br>> \
> > > > > > > > > ><a href="https://lists.isc.org/mailman/listinfo/dhcp-users"
 target="_blank">https://lists.isc.org/mailman/listinfo/dhcp-users</a><br><br>_______________________________________________<br>dhcp-users \
mailing list<br><a ymailto="mailto:dhcp-users@lists.isc.org" \
href="mailto:dhcp-users@lists.isc.org">dhcp-users@lists.isc.org</a><br><a \
href="https://lists.isc.org/mailman/listinfo/dhcp-users" \
target="_blank">https://lists.isc.org/mailman/listinfo/dhcp-users</a><br></div></div><div \
style="position:fixed"></div>


<!-- cg14.c2.mail.re1.yahoo.com compressed/chunked Tue Dec  8 18:58:18 PST 2009 -->
</div><br>
      



      <hr size=1>Yahoo!香港提供網上安全攻略,教 如何防範黑客!<a \
href="http://hk.promo.yahoo.com/security/"><b>了解更多</b></a></body></html>



_______________________________________________
dhcp-users mailing list
dhcp-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/dhcp-users

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic