my $username = `usermod -l $nname $name`; my $dirusername = `usermod -d /home/$nname -m $nname`;
I would recommend against this way of doing this because it allows for injection of arbitrary shell commands via $nname and $name, and it does not check for errors in the commands. See also.
In reply to Re^2: Linux::usermod - user name ... already exists
by haukex
in thread Linux::usermod - user name ... already exists
by mldvx4
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |