I am trying to create Linux users from PHP – Apache
shell_exec("sudo useradd -m $username"); shell_exec("yes $password | sudo passwd $username"); The code snippet above successfully creates the user but it does not set the password, am I doing something wrong? The $username is the megan user at the bottom of…