For the love of technology


Red Hat Enterprise Linux, force password reset on next login

So you set up a new account for a user on a Red Hat Enterprise Linux system and you want to set it to someting simple and then have the user change it next time they log in. One way to make sure that the user changes the password next time they log in is to force a password change by setting the password expiration to zero days since it was last changed.

edit /etc/hosts entry on mulitipule machines

Today I would like to share a bash program that I wrote to make it very quick to easily change the print client on a bunch of unix print clients. How it works is that all the print clients are told to print to prtserv and then in the /etc/hosts file you uncomment the print server that will be seeing the print clients today. There are three different options, where you have all print clients using server1, all print clients using server2, which is good for doing maintenance on one of the print servers.

cerner printer testing wrapper script

When you want to send test print jobs through the cerner application you have to use a long command that is impossible to remember and stick the print queue in the middle which is a pan and prone to error. So I created this little program to help out. To run the script you simply run. Where ps is the type of print jobs that can vary form ps, intermec, zebra to ascii.

CentOS-RedHat, rejister hostname with DHCP and DNS

So I have quite a few machines on my home network and even a few machines that are running as virtual machines. Almost all of the machines would resister their hostname with the router slash DHCP, DNS server. The only problem was that none of the CentOS machines would rejister their hostname with the router. I tried to make all sorts of changes to /etc/hosts and /etc/sysconfig/network but none of those changes made any diffrence.

simple ping test script

Here is a simple ping script. You privide the server-file and the program will output all the server thta do not respond to the ping request #!/bin/bash for i in $(cat server-file); do ping -c 1 $i > /dev/null 2>&1 if [ $? = 1 ]; then echo $i did not ping fi done