5 # ssh_dump.pl - Script to suck data outta the database to be processed by ssh_create.pl
9 require("/usr/lib/sourceforge/lib/include.pl"); # Include all the predefined functions
15 # Dump the Table information
16 $query = "SELECT user_name,unix_uid,authorized_keys FROM users WHERE authorized_keys != ''";
17 $c = $dbh->prepare($query);
19 while(my ($username, $unix_uid, $ssh_key) = $c->fetchrow()) {
20 $new_list = "$username:$unix_uid:$ssh_key\n";
21 push @ssh_array, $new_list;
24 # Now write out the files
25 write_array_file($file_dir."dumps/ssh_dump", @ssh_array);