msgbartop
A chronological documentation test project, nothing serious, really!
msgbarbottom

23 Dec 2008 Force a user to change password upon first login

This is how you can force a Redhat user to change his password upon first login on a Redhat 5 installation. This might work on other versions and distributions…

  1. First lock the account to prevent the user from logging in until the change has been made
  2. # usermod -L <username>
  3. Change the password expiration date to 0 to ensure the user changes the password during the next login attempt
  4. # chage -d 0 <username>
  5. To unlock the account after the change do the following:
  6. # usermod -U <username>

Tags: ,

Posted by

15 Dec 2008 MySQL search and replace

This is a simple SQL query to perform search and replace in a MySQL table

update tablename set fieldname = replace(fieldname,'search_for_this','replace_with_this');

Tags:

Posted by

01 Dec 2008 Network upgrade Ubuntu Server 8.04 to 8.10

This post describes how I upgraded my Ubuntu (Hardy Heron) 8.04 server installation to (Intrepid Ibex) 8.10 from the command line.

First you’ll need to make sure you are running the latest packages

# sudo aptitude update
# sudo aptitude safe-upgrade

Then you will need to install the Ubuntu upgrade package

# sudo aptitude install update-manager-core

You can start the upgrade when the package is installed

# sudo do-release-upgrade

Then you just have to follow the on-screen instructions and answer the questions as they pop up. One thing to note is the fact that it is not suggested to perform the upgrade via a remote ssh connection. I have done earlier upgrades multiple times before without any problems, but I might just have been lucky.

Tags: , , , , ,

Posted by