begin quoting Steven Gauna as of Fri, Feb 01, 2008 at 03:55:16PM -0800: > This is my first time posting to the mailing list. Please let me know if > I'm not doing something > correctly. :X
Wrap your lines before 80 characters to avoid the long-line-short-line effect, which is disconcerting for the reader. 72-76 is good, although anything less than 80 won't give cause for complaint. > I like the idea of a boot cd. I wrote a little script that makes a user, a > random password > sets up ssh on a random port, and sends an email to a designated address > with information > regarding the IP of the machine, the password, username, and port of ssh. > > This script requires the computer have internet connection, have an SMTP > agent installed > like postfix for example. So you see this being used for setting up a "please log in an help me" help-script? > So all you should have to do is get a nice boot cd running and configure the > script into > the proper run level. > > I've posted the script if anyone is interested in looking at it or improving > it, go right ahead. :) > http://dextrous.homelinux.org/startup_script > > hope it's useful. What do you use that's bash-specific? <poke> Hm... $RANDOM? Is that it? Why enforce being root? Maybe an appropriate user-account already exists; run this script too often, and you'll clutter stuff up. Having each exit code being a different value (to indicate what failed) is sometimes a good idea. No special characters in the password? Why use a password? You're using ssh -- use authorized_keys. Why the loop for the port? You're already using mod -- mod $RANDOM down to the range, then add the base in. Why muck about with modifying sshd_config? You're just going to mess something up. Wouldn't it be better to run sshd on an alternate port and leave the existing ssh installation alone? And you're stomping on the pre-existing port... bad. And what's wrong with port 22 anyway? Isn't it traditional to use the << TOKEN syntax to include large chunks of text in a shell script, like the body of an email message? You do not offer the user a chance to abort after telling them what you want to do. This coupled with must-run-as-root makes this a rather unfriendly tool... get rid of the little output there is, and it's sort of dastardly. -- Create me an account! No? SUDO create me an account! Stewart Stremler -- [email protected] http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list
