arakasi72 / rtinst

seedbox installation script for Ubuntu and Debian systems
MIT License
1.22k stars 259 forks source link

Please check the validity of user name input #269

Closed KevinWang15 closed 5 years ago

KevinWang15 commented 7 years ago

Thanks for the great script, it's been great help for many of my friends.

However, recently a friend of mine (who is not so linux-savvy) used this script to set up rutorrent, when he was asked for "the name of the user to install to", he typed in his email address (which is the username he uses the most often...) without second thought.

And then, as can be imagined, everything starts to fall apart, adduser complains

adduser: Please enter a username matching the regular expression configured via the NAME_REGEX[_SYSTEM] configuration variable. Use the `--force-badname' option to relax this check or reconfigure NAME_REGEX.

(and all the error messages were ignored by my friend too)

The worst thing is that, PermitRootLogin was set to no, in spite that no new user has been created. So now his server is beyond remedy...

It would be nice if a check is added there, so as to prevent linux novices from making such mistakes.

Thanks 😄

arakasi72 commented 7 years ago

will add to my todo list, no promises on when I will get it done though.

arakasi72 commented 5 years ago

Apologies this took so long, but has now been done. in latest release rtinst 1.8.4