From 9d3728f5eac745fe66937aec98969d316ad9ad81 Mon Sep 17 00:00:00 2001 From: John Klug Date: Tue, 26 Nov 2019 18:40:54 -0600 Subject: Make php-fpm run as root for now so useradd will work. --- www/pages/index.php | 136 ++++++++++++++++++++++++++++++++++++++++++++++++++++ www/pages/reg.php | 135 --------------------------------------------------- 2 files changed, 136 insertions(+), 135 deletions(-) create mode 100644 www/pages/index.php delete mode 100644 www/pages/reg.php (limited to 'www') diff --git a/www/pages/index.php b/www/pages/index.php new file mode 100644 index 0000000..3dcb684 --- /dev/null +++ b/www/pages/index.php @@ -0,0 +1,136 @@ +&1"; + syslog(LOG_ALERT, "useradd cmd: $cmd"); + $handle = popen($cmd, 'r'); + $result = fread($handle, 4192); + $status = pclose($handle); + syslog(LOG_ALERT, "useradd: status: $status result: $result"); + $cmd = "/usr/bin/passwd" . $username . " 2>&1"; + $handle = popen($cmd, 'r'); + $pwdtxt = $password . "\n" . $password; + $result = fwrite($handle, $pwdtxt); + pclose($handle); + syslog(LOG_ALERT, "passwd: status: $status result: $result"); + $finished = "Commisioning Complete"; + } + } else if ($mismatch === 1) { + $save_password = ""; + $password_err = "Mismatch"; + } + syslog(LOG_ALERT, "Leave post: save_password = $save_password"); +} +?> + + + + + + Commision Multi-Tech mLinux + + + + +
+

Commision Multi-Tech mLinux

+ +

+ Product-ID: + +
+ Device-ID: + + +
+ +
" method="post"> + +
+ + + +
+
+ + + +
+

+
+ + +
+
+
+ + diff --git a/www/pages/reg.php b/www/pages/reg.php deleted file mode 100644 index 0d4ce05..0000000 --- a/www/pages/reg.php +++ /dev/null @@ -1,135 +0,0 @@ -&1"; - $handle = popen($cmd, 'r'); - $result = fread($handle, 4192); - $status = pclose($handle); - syslog(LOG_ALERT, "useradd: status: $status result: $result"); - $cmd = "/usr/bin/passwd" . $username . " 2>&1"; - $handle = popen($cmd, 'r'); - $pwdtxt = $password . "\n" . $password; - $result = fwrite($handle, $pwdtxt); - pclose($handle); - syslog(LOG_ALERT, "passwd: status: $status result: $result"); - $finished = "Commisioning Complete"; - } - } else if ($mismatch === 1) { - $save_password = ""; - $password_err = "Mismatch"; - } - syslog(LOG_ALERT, "Leave post: save_password = $save_password"); -} -?> - - - - - - Commision Multi-Tech mLinux - - - - -
-

Commision Multi-Tech mLinux

- -

- Product-ID: - -
- Device-ID: - - -
- -
" method="post"> - -
- - - -
-
- - - -
-

-
- - -
-
-
- - -- cgit v1.2.3