Viewing articles in tech
<-- Back to main
Stupid Webmin Tricks
posted in tech by jon on 2007-04-13
I've been working alot with webmin in the past view weeks, and learning a ton along the way. I'm sure that most of this is already well documented (like the rest of webmin) but I didn't know it, and that makes it important. :-)
first trick: custom, "unattended" installs. Webmin's main setup script calls two external (and by default non-existent) scripts during the install process. By creating these two scripts, and placing them in the webmin install directory, you can "pre-set" various options; any variable pre-set in this way won't be prompted for during install. This is great for maintaining a standard configuration across multiple systems.
The first script, setup-pre.sh is called at the beginning of the setup script, and is primarily useful for pre-setting variables.
My commented example:
####################################### 5-2005 ##
#
# setup-pre.sh:
#
# called by setup.sh. sets up pre-defined
# variables that will be used as defaults
# by webmin setup rather than prompting
# the user. This allows for partially or
# completely automated installs. Variables
# declared here _won't_ be prompted for at
# install.
#
# author: jon allie [ jon (at)jonallie(dot)com
##################################################
## $config_dir: directory for webmin to store it's config files
# will be created by the installer if it doesn't exist.
config_dir=/opt/freeware/webmin/config
## $var_dir: directory for webmin to store it's log files
# will be created by the installer if it doesn't exist.
var_dir=/opt/freeware/webmin/log
## $perl: full path to the perl executable.
perl=/usr/bin/perl
## $os_type: os type, see os_list.txt for possible values
os_type=aix
## $os_version: version number of os_type specified above
os_version=5.2
## $real_os_type
real_os_type=IBM AIX
## $real_os_version
real_os_version=5.2
## $port: port for webmin server to listen on.
port=10000
## $login: webmin username
login=admin
## $password: plain text password. don't use this
#password=
## $crypt: pre-encrypted password. set this to 'x' to enable unix authentication
crypt=x
## $ssl: whether or not to use ssl. 1 for yes, 0 for no
# the Net::SSLeay library MUST be installed for
# this to function.
ssl=1
## $atboot: whether or not to start webmin at boot.
atboot=1
setup-post.sh is, of course, called at the end of the setup process, and can be used for just about anything.
Here, I'm disabling the (stupidly default) options to remember passwords and to display the system hostname on the login page.
####################################### 5-2005 ##
#
# setup-post.sh:
#
# called by setup.sh. this script is called
# as a final step before starting webmin
# at the end of install. Used to set final
# options.
#
# author: jon allie [ jon(at)jonallie(dot)com ]
##################################################
### set shorter name for location of global config file
gconfig=$config_dir/config
## exit if global config isn't writable
if [ ! -w $gconfig ]; then
exit 0
fi
### set extra security options in global config
## disable the option to remember passwords
echo "noremember=1" >> $gconfig
## disable display of hostname on login page
echo "nohostname=1" >> $gconfig
Permanent Link
Random Idea: The Pirate VCS
posted in tech by jon on 2007-03-04
After reading about Sourceforge being forced to remove the backupHDDVD project, I had a thought: Why isn't there a 'Pirate Bay' for developers? a distributed, untrackable version control system that could be used for developing projects of questionable legality, sortof a bazaaar + bittorret 'mashup' (yea, I'm starting to hate that word too)
Permanent Link
on AIX
posted in tech by jon on 2005-04-18
As I mentioned in an earlier post, I've changed jobs. Part of the change involves moving from working mostly with linux servers to AIX. A few quick observations/complaints._The Bad_1.) IBM doesn't hesitate to reinvent the wheel. At every turn, you find yourself forced to do things the "AIX way" rather than the unix way. This makes anything you learn NON-TRANSFERABLE. This is one of my biggest pet peeves lately: there are only so many hours in the day, and so many things that i can learn; it's an enormous waste of time and effort to learn things I can't use anywhere else. 2.) The ODM. Come on IBM; this is nothing but the windows registry in disguise. It's a silly, silly, siily idea to store your configuration info in a some arbitrary database format that's easy to corrupt and leave your system unbootable. Having to reinstall your OS because you mistyped a query info a odmdelete command is stupid; and it ain't unix3.) LPAR. This isn't actually BAD, so much as is is SAD. They are actually bragging about finally being able to "split" a single cpu to run multiple hosts. Please. VMWare is light years ahead of Hypervisor in so many ways.4.) Licensing. This is another one that's just sad. My instructor actually bragged about the fact that you didn't have to pay liscensing costs for hot-spare CPUs. Minutes later, he brags about the fact that AIX can now run linux binaries. Hmm.....if linux is free, and has software that I want to run..., why wouldn't I just run linux?5.) Boot times. On the test box I worked on today, it took at least 4 complete minutes to boot AIX. 4 minutes. Too slow. Especially since the kernel is stored in NVRAM.6.) ksh. ksh sucks. Hard. Anybody NOT find tab completion helpful? Any reason up-arrow shouldn't access the command history? Sure, i can make it better with .kshrc entries, but I shouldn't have too. Both "vi mode" and "emacs mode" blow, neither is intuitive. Sensible defaults go a long way, and ksh is sorely lacking in this dept. Some of it I'll chalk up to muscle memory: bash is what I learned after all, but I just can't seem to like ksh, no matter how much I try._The Good_1.) LVM. LVM is awesome, and AIX's is the original implementation. LVM on AIX is seamless and integrated tightly into the OS, the way it should be on linux.2.) Good backup/restore tools. Good solid, reliable tools for backup and restore make for easy sleep.3.) 64bit kernel.
Permanent Link
Second post of the night: Markdown
posted in tech by jon on 2005-03-26
In the spirit of more typing practice, as well as to give a little press to a great product, I wanted to do a short little post about [markdown][md]. Created to be an easy, natural way for writers to produce natural looking text, that also displays nicely on a web page, [markdown][md] consists of a few simple text formatting rules to produce nice, valid HTML while leaving the original text perfectly readable as plain text. If you don't know why that's cool, you don't do a lot of writing for the web. If that sounds like something you could use, head over to [daring fireball][md] and check it out. [md]: http://www.daringfireball.net
Permanent Link
TCS: Tech Central Station - The Faith-Based Encyclopedia
posted in tech by jon on 2004-11-16
TCS: Tech Central Station - The Faith-Based EncyclopediaExcellant article dissecting the effectiveness (or lack thereof) of the "collaborative" model, using the wikipedia project as an example.Best quote:
Is this a surprising result? Not really: Take the statements of faith in the efficacy of collaborative editing, replace the shibboleth "community" with the banal "committee," and the surprise dissolves before your eyes. Or, if you are of a statistical turn of mind, think a little about regression to the mean and the shape of the normal distribution curve. However closely a Wikipedia article may at some point in its life attain to reliability, it is forever open to the uninformed or semiliterate meddler.
Permanent Link
Why marketing ruins IT
posted in tech by jon on 2004-03-26
Tunes FAQ"A proven 32-bit cutting-edge state-of-the-art industrial-strength Y2K-compliant zero-administration plug-and-play industry-standard Java-enabled internet-ready multimedia professional personal-computer Operating System that is even newer and faster yet compatible, with a user-friendly object-oriented 3D graphical user interface, amazing inter-application communication and plug-in capability, an enhanced filesystem, full integration into Enterprise networks, an exclusive way to deploy distributed components, seamless network sharing of printers and files." (yuck)
Permanent Link
Samba/LDAP update
posted in tech by jon on 2004-03-24
First successful test logging windows workstations onto the new domain. Next up: netlogon scripts to map printers, home directories and network drives. The ldap support in Samba 3 seems veeery slick so far. smbpasswd -a now adds all relevant samba entries to the ldap database.
Permanent Link
SAMBA - LDAP
posted in tech by jon on 2004-03-23
woohoo. I finally got SAMBA working with an LDAP backend. I have smbpasswd automatically adding the attributes for a Samba user to the ldap database and user shares seem to work correctly. Now I just need to get a few machines joined to the new domain.Goodbye NT.
Permanent Link
5433|< 133+?
posted in tech by jon on 2004-03-22
Permanent Link
Installing Mysql 4.1 Alpha on Debian
posted in tech by jon on 2004-03-22
Finally got mysql 4.1 alpha to install on my debian box using, of all things, alien.The only hack I used to get it working was to create a symlink from /etc/mysql/my.conf to /etc/my.conf.Subqueries are now supported. Select * from t1 where (select * from t2).
Permanent Link