UNIX passwd structure

passwd syntax:
username:password:uid:gid:comment:homedirectory:login-shell

username: Contains the user or login name.

password: Contains an x, a placeholder for the encrypted password. The encrypted password is stored in the shadow file.

uid: Contains a user identification (UID) number that identifies the user to the system.

gid: Contains a group identification (GID) number that identifies the user’s primary group.

comment: Usually contains the full name of the user. (This field is informational only.)

home-directory: Contains the user’s home directory path name.

login-shell: Contains the user’s default login shell, such as /bin/bash

shadow syntax:
username:password:lastchg:min:max:warn:inactive:expire

username: Contains the user or login name.

password: The encrypted user password

lastchg: Indicates the number of days between January 1, 1970, and the last password modification date.

min: Contains the minimum number of days required between password changes.

max: Contains the maximum number of days the password is valid before the user is prompted to specify a new password.

inactive: Contains the number of days a user account can be inactive before being locked.

expire: Contains the absolute date when the user account expires. Past this date, the user cannot log in to the system.

Upgraded/Updated site

Well, a couple days ago I finally upgraded off of the WordPress 2.0 branch and jumped up to 2.2 branch. The upgrade process is very straight forward, however, the process is a little on the long side. At least it is for me because I am never happy with it straight out the box. Besides the several plugins I use, I end up tweaking the theme template as well. Previously, this site always used the default WordPress template, which they would always update with every version. This made it so that I would always have to re-add my customizations to the new version. The default template is pretty plain, so this time I took the time to find a new template. So far I am pretty happy with the template I have chosen. I still had to modify it a little, but at least this way it is my option to update it or not. The template is also supposed to be designed with SEO in mind, so we’ll see if it does any better then it’s predecessor.

Linux Virtualization = Linux-VServer

I get sick of reading/scanning all of these articles in eWeek, ComputerWorld, etc that talk about virtualization and then go on to compare Xen and VMWare. Usually they end up saying how much better VMWare is because it has been around for so much longer. Sure Xen has just started, but why is that the only Linux offering they care to mention or compare everything to?

I have used Linux-VServer for three years and the company that used it had been using it for at least another 3 years before that. As a matter of fact, you can trace it back to it’s first release back in 2001. So why is it never mentioned? Because of the number one pusher – money! Xen is backed by people trying to make money, consequently they have marketing people who want to get it in the news and they are doing a good job. It would just be nice to see a magazine that actually cared about providing real information to their readers, instead of being marketing pawns. Leave the advertising for the ads and keep it out of the article!

If you would like to learn more about the extremely stable Linux virtualization leader, check out their website at http://www.linux-vserver.org/

Stripped down JSSpamBlock

So a friend of mine mentioned in his blog that he used Paul Butler’s JSSpamBlock plug-in with his WordPress blog to prevent spam. I thought it was a great idea, but I wanted to apply it to a script I had written previously that was just a basic guestbook page (not WordPress). I was getting a lot of bots hitting it and trying to post their links. I blocked all links in my code, but I still ended up getting a bunch of random hits with no links. So I took a look at his code (originally written in php) and stripped it down to two small simple sections. One is the actual JavaScript that he uses and then some simple perl on the backend parsing script to check for it.

Here’s the JavaScript section, put it within your form code (slightly modified variable names keep the bots from automating any fixes for this):

http://www.utahsysadmin.com/files/bot_javascript.txt

And then have something like this in your perl script:

http://www.utahsysadmin.com/files/bot_perl.txt

(Sorry, not sure how to get WordPress to not show the actual code and not run it)

Solaris System Info Commmands

prtconf – displays the Solaris device tree

prtdiag – displays a table of diagnostic information that summarizes the status of system components (also use -v to show additional parts)

prtfru – displays a hierarchical list of all FRUs in the system (-c & -l)

psrinfo – displays additional information about the CPUs (-v includes types and speeds)

showrev – displays revision information for the current hardware and software (-p shows patches – same as patchadd -p)

sysdef – display current settings of kernel tunable parameters (defined in /etc/system, applied with reboot)

prctl – displays resource controls of running processes

fuser -c /mountpoint – displays processes (PIDs) with open files in the specified mount point (use without the -c to show non mount points)