reload.sh: Cron Script to Reshuffle SHOUTcast Playlist
by dervish on Nov.16, 2012, under Linux, Scripts
|
MySQL Logrotate Error
by dervish 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
Server Migration
by dervish 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)
SSH Passwordless Login Fails
by dervish on Oct.24, 2012, under Red Hat
After verifying file permissions, still unable to login without entering passsord. Found issue where SELINUX was keeping the SSH service from reading the authorized_keys file. Issue encountered on a Red Hat 6 server.
Fix:
$ restorecon -R -v /home/user/.ssh
restorecon reset /home/user/.ssh context unconfined_u:object_r:home_root_t:s0->unconfined_u:object_r:ssh_home_t:s0
restorecon reset /home/user/.ssh/known_hosts context unconfined_u:object_r:home_root_t:s0->unconfined_u:object_r:ssh_home_t:s0
restorecon reset /home/user/.ssh/id_dsa context unconfined_u:object_r:home_root_t:s0->unconfined_u:object_r:ssh_home_t:s0
restorecon reset /home/user/.ssh/id_dsa.pub context unconfined_u:object_r:home_root_t:s0->unconfined_u:object_r:ssh_home_t:s0
restorecon reset /home/user/.ssh/authorized_keys context unconfined_u:object_r:home_root_t:s0->unconfined_u:object_r:ssh_home_t:s0
Passwordless login now works:
$ ssh gilis28.fls
Last login: Wed Oct 3 14:07:00 2012 from 10.255.2.204
[user@GILIS28 ~]$
Enable Backspace Delete on HP-UX
by dervish on Oct.17, 2012, under HP-UX
stty erase [hit backspace key][enter]
$ uname
HP-UX
$ stty erase ^?
$
If you don’t want to remap the backspace, then just use ^h (control-h).