server

Crontabs of all users

Sometimes it can be helpful to list the crontabs of all users. Eg. to find out why your server periodically has a load of over 80%...

for user in $(cut -f1 -d: /etc/passwd); do crontab -u $user -l; done

Now you can search all crontabs that are done on the time of your load peak.

Plesk and Drupal-Multisites

In order to benefit from drupals amazing functionality concerning multisite capability, you have to do some extra-stuff in your plesk-config, more precisely in your vhost-config.

Example scenario

You administer 50 customer drupal sites on your plesk-server. Every time a new drupal release comes up, you have to update every single one of this 50 installations (we didn't even talk about the modules).
No question: enormous waste of time and disk space.

Let's dare an approach

Fixing glsa-check returns "cannot fix GLSA, no unaffected packages available"

From time to time you have to run glsa checks to keep your machine safe.

In my case, I run it by nagios, my server-monitoring tool.

So one day, it reported me this GLSA's:
200805-04
200804-20
200907-03

But when I now tried to fix them by using
glsa-check -f 200805-04
it returned

Fixing GLSA 200804-20
>>> cannot fix GLSA, no unaffected packages available

self-signed apache certificate

Generate private key:

openssl genrsa -des3 -out server.key 1024

Generate csr (Certificate Signing Request)

openssl req -new -key server.key -out server.csr

Remove passphrase from key

cp server.key server.key.org
openssl rsa -in server.key.org -out server.key

Generate self-signed chertificate

openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt

Install new certificate under gentoo

cp server.crt /etc/apache2/ssl/server.crt
cp server.key /etc/apache2/ssl/server.key

run scp in background

for scping large files, its very comfortable to let them run in the background.

especially when you are at home and want to turn off the pc and let the servers do their work over night.

how to:

execute the normal scp command, eg:

$ scp localfile.tar.bz2 user@server.ch:/path/on/server/

after confirming the key and authentificating (if necessary), you can "stop" the job by pressing : ctrl + Z

[1]+  Stopped                 scp localfile.tar.bz2 user@server.ch:/path/on/server/

SSH-Login via Key, ohne Passwort

Wie ist es möglich, sich ohne Passworteingabe an einem SSH-Server anzumelden?

Gar nicht so schwer:

 

Too Cool for Internet Explorer