Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

question concerning remove portion of the RADIUS::UserFile module

Status
Not open for further replies.

jewel464g

Technical User
Jul 18, 2001
198
US
Link to module:
I finished the portion of my code that searches the user file and if the user isn't it in adds a new one. Not to difficult using this module. However, when I get to the remove portion, it doesn't seem to work. Anyone got any experience with this??? Here's my remove code.

#! /usr/local/bin/perl
use FileHandle;
use RADIUS::UserFile;

$| = 1;

my $username = $ARGV[0] || '';


my $users = new RADIUS::UserFile
File => 'users.txt',
Check_Items => [ qw(Password Auth-Type) ];

$users->remove($username);


Thanks,
Jewels

When faced with a decision, always ask, 'Which would be the most fun?'
 
ok, nevermind. After some playing I figured it out.

FYI: Add this line after the remove statment.

$users->update
or die("$0: There was a problem updating .\n");

When faced with a decision, always ask, 'Which would be the most fun?'
 
Jewel,

basically you need to commit the change after the deletion, is this correct?

--Paul

Nancy Griffith - songstress extraordinaire,
and composer of the snipers anthem "From a distance ...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top