ciphermethod.com

Linux

MySQL Logrotate Error

by on Nov.06, 2012, under Debian, Linux

If you move a database to another server, you may need to reset the MySQL password for the debian-sys-maint user.

Error encountered:
/etc/cron.daily/logrotate:
error: error running shared postrotate script for ‘/var/log/mysql.log /var/log/mysql/mysql.log /var/log/mysql/mysql-slow.log ‘
run-parts: /etc/cron.daily/logrotate exited with return code 1

Fix:

Set password for debian-sys-maint user to the one contained in the /etc/mysql/debian.cnf file.

# cat /etc/mysql/debian.cnf
# Automatically generated for Debian scripts. DO NOT TOUCH!
[client]
host = localhost
user = debian-sys-maint
password = xxxxxx
socket = /var/run/mysqld/mysqld.sock
[mysql_upgrade]
host = localhost
user = debian-sys-maint
password = xxxxxx
socket = /var/run/mysqld/mysqld.sock
basedir = /usr

# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.

mysql> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> UPDATE user SET Password = PASSWORD(‘xxxxxx’) WHERE User = ‘debian-sys-maint’ && Host = ‘localhost’;
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0

mysql> quit;
Bye

Leave a Comment more...

Server Migration

by on Oct.25, 2012, under Linux

Transfered to new server:
Old: Single Core 2806.964 MHz Virtual Machine – 512M RAM – Ubuntu (Maverick)
New: Quad Core Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz – 16G RAM – Ubuntu (Precise)

Leave a Comment more...

GPG Key Trust

by on Sep.17, 2012, under Linux



When importing a public key onto another machine, you may have configure gpg to
trust the key. Otherwise, when you use the key to do encryption, you may
see a prompt like this:

It is NOT certain that the key belongs to the person named
in the user ID. If you *really* know what you are doing,
you may answer the next question with yes.

Use this key anyway? (y/N)

To trust the key, run:
gpg --edit-key NAME

GPG will output some information, and show a line like:
trust: undefined validity: unknown

You will be at a console, and you have to type "trust":
Command> trust
Please decide how far you trust this user to correctly verify other users' keys
(by looking at passports, checking fingerprints from different sources, etc.)

1 = I don't know or won't say
2 = I do NOT trust
3 = I trust marginally
4 = I trust fully
5 = I trust ultimately
m = back to the main menu

Your decision? 5
Do you really want to set this key to ultimate trust? (y/N) y

Type "quit" to quit. If you run gpg --edit-key NAME again, you will
see a line as below, which means the key is now trusted.
trust: ultimate validity: ultimate

Leave a Comment more...

Missing insserv

by on Aug.20, 2012, under Linux, Ubuntu

# chkconfig saned off
/sbin/insserv: No such file or directory

# chkconfig webmin off
/sbin/insserv: No such file or directory

# ln -s /usr/lib/insserv/insserv /sbin/insserv

# chkconfig saned off
#

I <3 Ubuntu

Leave a Comment more...

error: Could not load ssh_host_ecdsa_key

by on Aug.20, 2012, under Linux, Ubuntu

Error in log:
error: Could not load host key: /etc/ssh/ssh_host_ecdsa_key

Fix:
sudo ssh-keygen -t ecdsa -f /etc/ssh/ssh_host_ecdsa_key -N ”

The ecdsa SSH key in not being generated by default.

Leave a Comment more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

But Wait, There's More!

A few highly recommended friends...