-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello Dustin,
Thank for the script. I would like to ask for you help just to clarify a few problem that I'm not too sure of. If you don't mind. 1) Can omshell list the old or current least or config? 2) If no, What need to be done if we want to know some of the old Group Config? Regards, Chan Min Wai Dustin Doris wrote: >>Hello all, >> >>Recently I found that omshell can be use to control the dhcpd server >>without restarting the server. >>So I'm thinking would there be a way to ask the freeradius to "Talk" to >>omshell when a users auth and assign an ip though omshell. >>When the users request the ip from dhcpd server, he will get the one >>that freeradius assign. >> >>Nice idea? :) >> >>Any Though. >> >>Thank You >>Chan Min Wai >> > > > Thats an interesting idea. A long time ago I wrote an expect script to > change the IP address of a user. This had nothing to do with freeradius, > but it could help. This will basically just help you with the syntax that > omshell uses. You would need to pull out the variables from freeradius > somewhere and execute this script with those variables. I was just > setting the client name to the mac address, which is why both name and mac > pull from the same argv. You would run the script like this (saying its > named something like dhcp.expect) > > dhcp.expect 192.168.0.5 0:60:1d:f1:75:d > > Hope this helps in getting you on your way. > > #!/usr/local/bin/expect -df > > set name [lindex $argv 1] > set mac [lindex $argv 1] > set ip [lindex $argv 0] > > spawn /usr/local/bin/omshell > expect ">" > send "connect\r" > expect ">" > send "new host\r" > expect ">" > send "set name = \"$name\"\r" > expect ">" > send "set hardware-address = $mac\r" > expect ">" > send "set hardware-type = 1\r" > expect ">" > send "set ip-address = $ip\r" > expect ">" > send "create\r" > expect ">" > > exit > > > - > List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFCJm66V0p9slMZLW4RAj+uAKDgiFzfbMfJ0CCj07V09a6/BTpMgQCeMxXh naJwjsYBA0e+ckZ5LLS5QZ4= =2Gw3 -----END PGP SIGNATURE----- - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

