ciphermethod.com

SFTP Received Message Too Long

by on May.28, 2013, under Linux, MAC

“Received message too long” can be caused by using /sbin/nologin as the users shell for an account that is being accessed via SFTP. SFTP generates the error when it receives unexpected output during the login.

lily:~ dervish$ grep user /etc/passwd
user:x:101347:101347:User SFTP Account:/var/SFTP/user:/sbin/nologin

lily:~ dervish$ sftp user@sftp.server.com
user@sftp.server.com's password:
Received message too long 1416128883

touch /etc/nologin.txt

lily:~ dervish$ sftp user@sftp.server.com
user@sftp.server.com's password:
Connection closed

lily:~ dervish$ /sbin/nologin
This account is currently not available.




Leave a Comment more...

GPG error: public key not available

by on Apr.09, 2013, under Mint

Error during apt-get update:
W: GPG error: http://packages.mate-desktop.org precise Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 68980A0EA10B4DE8

Solution:
apt-get install mate-keyring-archive

Leave a Comment more...

reload.sh: Cron Script to Reshuffle SHOUTcast Playlist

by on Nov.16, 2012, under Linux, Scripts



#!/bin/sh
# Perform kill -USR1 on running sc_trans
# Use in nightly cron to reshuffle "random" playlist
# 20121116 - Jamey Hopkins
 
# Note: sc_trans accepts the following signals:
# HUP - flush logfiles (close and reopen) -- will make console logging stop
# WINCH - jump to next song
# USR1 - reload playlist off disk (will not interrupt current playing stream)
# USR2 - toggle shuffle on/off
# TERM - normal sc_trans shutdown (clean)
 
ID=`ps -ef | grep sc_trans | grep -v grep |awk '{ print $2 }'`
 
if [ "$ID" ]
then
  echo "Reloading playlist for sc_trans at $ID"
  kill -USR1 $ID
else
  echo "Did not find a running sc_trans"
fi


Leave a Comment more...

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...


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...