I have a perl script I am creating. Simple enough, just adds a user and assigned group and permissions.
I keep getting an error when using the -G in adduser
this is my code so far. Also any ideas on how to end the program when done. I was playing with some until conditionals and if else but nothing that I have mastered.
#user add script
print "Welcome to AddUser Script\n\n";
print "To end this program, please enter end as the username\n\n";
print "User Name:";
$userinput = <STDIN>;
useradd -G emails $userinput;