瀏覽代碼

bin scripts for adding users

George Baugh 2 年之前
父節點
當前提交
06e22eedf2
共有 1 個文件被更改,包括 16 次插入0 次删除
  1. 16 0
      bin/migrate4.pl

+ 16 - 0
bin/migrate4.pl

@@ -0,0 +1,16 @@
+#!/usr/bin/env perl
+
+use strict;
+use warnings;
+
+use FindBin::libs;
+
+use Trog::Auth;
+
+my ($user, $pass) = @ARGV;
+
+# TODO better arg handling, etc
+die "User must be first arg" unless $user;
+die "Password must be second arg" unless $pass;
+
+Trog::Auth::useradd($user, $pass, ['admin']);