How can I add a user to ubuntu and apache (from xampp) using a sh script? [migrated]

miahbesmokin420

New Member
I found this script here:\[code\]#!/bin/shuser=$1 #first argument apache="www-data"passuser=$2 # second argumentnewpasswd=$(perl -e 'print crypt($ARGV[0], "S@LtStR!Ng")' $passuser)createuser='/usr/sbin/useradd' # PATH to `useradd` package##create and update password, then assign the apache group to the user$createuser -d /home/$user -g $apache -m -s /bin/bash -p $newpasswd $user\[/code\]It adds an user to ubuntu but not to the server. When I open the httpd.conf file the user is not there.This is how I run the script:\[code\]root@vmachine:./createuser.sh [newUsername] [newUserPass]\[/code\]So they told me the script have nothing to do with apache but there is a way to modify this to add the user to httpd.conf?
 
Back
Top