Tag Info

Hot answers tagged


In my opinion, you need to recommend to your client to change their policy. As Ulrich Schwarz said in a comment, it's kind of surprising that all-numeric usernames work at all. Consider this: if a user called 12345 exists in the system, how would you use the chown command to change a file's uid to the numeric value 12345? Hint: it's actually possible, but ...


I don't know what you mean by "next available" with respect to the $HOME and $SHELL variables. Those you just set to their defaults: /home/USERNAME and /bin/bash or whatever. For the $HOME, just make sure the directory does not exist ([ -e "/home/$username" ] && echo "Directory exists"). As for the groups, just list the available groups and take ...

Only top voted, non community-wiki answers of a minimum length are eligible