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.
You can disable SSL in fetchmail by adding this line to your rc file:
This restricts fetchmail to only use SSLv2 and SSLv3, disabling TLSv1. Note that this will cause the connection to be unencrypted, unless you use a proper SSL plugin, or SSL is requested explicitly.
Google Chrome can start up in fullscreen (F11) by default. This is done by enabling Kiosk-mode during startup. To do this, set the shortcut to Chrome like so:
To have scripted automated backup of PostgreSQL databases on a linux platform, you can create a script like so:
#!/bin/bash PGPASSWORD="your-password" /usr/bin/pg_dump -U user database > sql-file.sql
Replace user and your-password with your username and password; replace database with the database you want to backup. The output of the dump goes to stdout and can be piped to a plain text file or compressed to something else.
This package provides files to enable syntax highlighting in nano when editing shorewall configuration files, making it easier to maintain these kinds of files.
For a shell script to determine its own location, you can use this code snippet. It takes relative and absolute paths into account.
#!/bin/bash if [[ $0 == '/'* ]]; then MYLOCATION="`dirname $0`" else MYLOCATION="`pwd`"/"`dirname $0`" fi echo "My location is: $MYLOCATION"
If for some reason you lost your SSH server keys, sshd will fail to start with error:
Could not load host key: /etc/ssh/ssh_host_rsa_key Could not load host key: /etc/ssh/ssh_host_dsa_key
You can recreate your host keys with these commands:
ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key
After recreating the keys, you will probably have to let your clients know as with the change of keys, they'll probably get warnings about it (Linux SSH will not even connect until you kick out the old keys).
Like any other MTA, Postfix has a maximum message size that it allows to pass through. By default, when not defined, it is set to 10 MB.
To change it, add/change the following in main.cf:
message_size_limit = 15728640
This sets the limit to 15 MB. To make it unlimited, set it to 0.