You can easily test the availability of an NTP server by using ntpdate. This utility is a command line utility which performs a one-time time sync to the specified NTP server but it can also be used to query the time without setting it by using the -q parameter:
$ ntpdate -q 10.30.0.1 server 10.30.0.1, stratum 4, offset 0.001217, delay 0.04170 8 Jan 10:19:36 ntpdate: adjust time server 10.30.0.1 offset 0.001217 sec
Found this page very useful when I had to compile some stuff for a Geode LX:
Note: this original post was from May 2007 but someone pointed out to me that the link no longer worked, in an attempt to sell me some web hosting... So... Thanks, but I'm sticking with my current hosting company.
You can efficiently change the console fonts, character sets and keymaps through the following command:
sudo dpkg-reconfigure console-setup
The configuration is stored in the file /etc/default/console-setup, and can be edited by hand as well.
The changes are effective for all virtual consoles after reboot. To apply the change for the current console, run:
To prevent changing the console font completely (i.e. native system/BIOS font will be used), set the font to "do not change".
The equivalent in the config file is:
Nice article about things you can do after a fresh install of Ubuntu on your computer:
Very useful if you don't have a whole lot of experience with linux in general, and Ubuntu in particular.
A nice article about how to set up NIS on Red Hat linux: http://bradthemad.org/tech/notes/redhat_nis_setup.php.
This is a Perl script I wrote and used for the migration of a linux DHCP server (running dhcpd to a Windows DHCP server. The script looks in the dhcpd.conf configuration file for fixed reservations and exports these to a CSV for processing and importing in another server.
Usage is simple, as it takes its input from STDIN and outputs to STDOUT.
cat /etc/dhcpd.conf | perl export-dhcpd-reservations.pl > output.csv
The script is very simple and can probably do with a lot of improvements, but it's a start for anyone willing to develop it further. It is licensed as GPLv3.
To block traffic from/to a specific IPv4 address using iptables, you can use these commands:
iptables -A INPUT -s 188.8.131.52 -j DROP iptables -A OUTPUT -d 184.108.40.206 -j DROP
The quick and dirty way to set up an NTP server on Debian Linux for your network.
This has been tested using Debian 7.0 "Wheezy".
1. Install NTP server:
apt-get install ntp
2. Edit /etc/ntp.conf: add the networks that are allowed to sync with your time server like so (Adjust parameters accordingly.):
restrict 192.168.0.0 mask 255.255.255.0 nomodify notrap
3. Restart the NTP service:
4. Set your device/computer/server to use your NTP server
You can script password changes in linux by using passwd without any additional effort. The syntax for this is:
echo "your-password" | passwd --stdin user
You can change the delimiter of a for-loop by changing the value of the global variable $IFS. By default this is set to a space.
For example, if you want the delimiter to be a new line, set it like so:
Simple Linux Load is a simple disk and CPU load generator to stress linux servers. I mashed this up when I had to put some load on a machine to troubleshoot issues with it which were only occuring under load.
It consists of two very simple shell scripts, each generating and deleting a 4GB file, and this in a loop.
There's no licensing on these scripts. You can do with it whatever you want.