ssh_dump.pl

来自「GForge 3.0 协作开发平台 支持CVS, mailing lists, 」· PL 代码 · 共 26 行

PL
26
字号
#!/usr/bin/perl## $Id: ssh_dump_2_5.pl,v 1.1 2001/11/02 11:43:06 cbayle Exp $## ssh_dump.pl - Script to suck data outta the database to be processed by ssh_create.pl#use DBI;require("/usr/lib/gforge/lib/include.pl");  # Include all the predefined functionsmy $ssh_array = ();&db_connect;# Dump the Table information$query = "SELECT user_name,unix_uid,authorized_keys FROM users WHERE authorized_keys != '' AND status !='D'";$c = $dbh->prepare($query);$c->execute();while(my ($username, $unix_uid, $ssh_key) = $c->fetchrow()) {	$new_list = "$username:$unix_uid:$ssh_key\n";	push @ssh_array, $new_list;}# Now write out the fileswrite_array_file($file_dir."dumps/ssh_dump", @ssh_array);

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?