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:
IFS=$'n'
You can disable SSL in fetchmail by adding this line to your rc file:
sslproto ssl23
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:
C:\path\to\chrome.exe --kiosk
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.
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.
« ‹ | December 2024 | › » | ||||
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 |