# # add double-quote characters to either end of realname # # $realname = '"' . $realname . '"'; # commented out above line after fruiture pointed out that # system LIST format makes it unnecessary -- and even # wrong, since realname would then be stored with '"' # on either side! # run system command, but pass args directly to the # adduser program, rather than booting a shell if (!system("adduser", $username, '-g', '100', '-s', '/bin/false', '-d', "/home/$username", '-p', $encrypted_pass, '-e' $expiry_date, '-c' $realname ) ) { die "trouble adding user: returned non-zero\n"; }