summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2019-11-26 18:40:54 -0600
committerJohn Klug <john.klug@multitech.com>2019-11-26 18:40:54 -0600
commit9d3728f5eac745fe66937aec98969d316ad9ad81 (patch)
tree5ec37f35eec488b17f1ba28389733931712b7098 /www
parent0abc02565f4145f75f005db4162d4d5590fdd5a1 (diff)
downloadcommissioning-9d3728f5eac745fe66937aec98969d316ad9ad81.tar.gz
commissioning-9d3728f5eac745fe66937aec98969d316ad9ad81.tar.bz2
commissioning-9d3728f5eac745fe66937aec98969d316ad9ad81.zip
Make php-fpm run as root for now so useradd will work.
Diffstat (limited to 'www')
-rw-r--r--www/pages/index.php (renamed from www/pages/reg.php)1
1 files changed, 1 insertions, 0 deletions
diff --git a/www/pages/reg.php b/www/pages/index.php
index 0d4ce05..3dcb684 100644
--- a/www/pages/reg.php
+++ b/www/pages/index.php
@@ -64,6 +64,7 @@ if($_SERVER["REQUEST_METHOD"] == "POST"){
if(empty($username_err) && empty($password_err) && empty($confirm_password_err)){
// Create user in sudo group
$cmd = "/usr/sbin/useradd -U -m -G sudo,dialout,disk -s /bin/bash " . $username . " 2>&1";
+ syslog(LOG_ALERT, "useradd cmd: $cmd");
$handle = popen($cmd, 'r');
$result = fread($handle, 4192);
$status = pclose($handle);