If you happen to be working on a system where you want to convert unix time to human readable format, use this:
perl -p -e 's/^([0-9]*)/"[".localtime($1)."]"/e'
Its a perl command that when applied to a .log file allows you to convert unix time to a format that is readable to the user. You can pretty much use this with other small shell tools to do wonderful things.
This blog is all about life of being a systems administrator, it highlights the achievements and hurdles of managing small to large systems running on Unix/Linux platforms.
Tuesday, August 25, 2015
Sunday, August 16, 2015
Nouveau causing the Linux Mint System to Freeze
Ever had an experience that suddenly your Linux system freezes for no apparent reason? This is manifested, when you tried to fire-up chrome (at least in my case) and doing some check on dmesg / syslog points to this:
The problem here lies with the video drivers loaded to the kernel is having a (NOT going to discuss the internals here) hard time figuring out how to work with the hardware of your system. It can be very painful especially if you are not sure where to look at.
The SOLUTION:
and then do:
Afterwards reboot the system.
The problem here lies with the video drivers loaded to the kernel is having a (NOT going to discuss the internals here) hard time figuring out how to work with the hardware of your system. It can be very painful especially if you are not sure where to look at.
The SOLUTION:
sudo apt-get --purge remove xserver-xorg-video-nouveau
and then do:
sudo ldconfig
Afterwards reboot the system.
Wednesday, February 18, 2015
Enabling SSH Login Email Alerts
If you happen to be figuring out who is loging in or what is being logged in the system you can always use this defined entry to .bashrc to help monitor it.
echo 'ALERT - Root Shell Access (ServerName) on: `date` `who` | mail -s "Alert: Root Access from `who | cut -d'(' -f2 | cut -d')' -f1`" some_domain@domain.com
But please note that you will have to have either postfix / sendmail (mail server) and mail client "mailx" installed to get this working.
echo 'ALERT - Root Shell Access (ServerName) on: `date` `who` | mail -s "Alert: Root Access from `who | cut -d'(' -f2 | cut -d')' -f1`" some_domain@domain.com
But please note that you will have to have either postfix / sendmail (mail server) and mail client "mailx" installed to get this working.
Monday, January 26, 2015
SSH Problem: /usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
When you encounter an error relating to this one:
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
Please install the following packages to help fix the issue "ssh-import-id"
Reload the SSH server then try again. For more modern linux systems running on Cinnamon in my case using LinuxMint I have to use the following syntax to get it right.
ssh-copy-id -p 35354 -i .ssh/id_rsa.pub user@some_ipV4_address
Cheers!
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
Please install the following packages to help fix the issue "ssh-import-id"
Reload the SSH server then try again. For more modern linux systems running on Cinnamon in my case using LinuxMint I have to use the following syntax to get it right.
ssh-copy-id -p 35354 -i .ssh/id_rsa.pub user@some_ipV4_address
Cheers!
Friday, January 9, 2015
Trobleshooting Roundcube Webmail Error: Message size exceeds fixed limit
At times you will encounter an error with your roundcube system with bouncing emails caused by limitations in the mail system. If you get this error: Message size exceeds fixed limit
Chances are your message_size_limit is not set to be as flexible with your current configuration for roundcube to fix this do the following:
1. Edit the file which roundcube reads to assign the global variables /var/www/html/roundcube/.htaccess file and change the following configurations to this one.
php_value upload_max_filesize 32M
php_value post_max_size 32M
2. Check your postfix mailer configuration by issuing the command:
postconf -d |grep message_size_limit
If you did not get a value you need to fix this.
3. To fix the limit issue the command.
postconf -e 'message_size_limit = 104857600'
4. To fix the 'mailbox_size_limit' issue you need to add this using the command:
postconf -e 'mailbox_size_limit = 0'
5. Reload postfix for the changes to apply.
Chances are your message_size_limit is not set to be as flexible with your current configuration for roundcube to fix this do the following:
1. Edit the file which roundcube reads to assign the global variables /var/www/html/roundcube/.htaccess file and change the following configurations to this one.
php_value upload_max_filesize 32M
php_value post_max_size 32M
2. Check your postfix mailer configuration by issuing the command:
postconf -d |grep message_size_limit
If you did not get a value you need to fix this.
3. To fix the limit issue the command.
postconf -e 'message_size_limit = 104857600'
4. To fix the 'mailbox_size_limit' issue you need to add this using the command:
postconf -e 'mailbox_size_limit = 0'
5. Reload postfix for the changes to apply.
Subscribe to:
Posts (Atom)