Tuesday, August 25, 2015

Convert Unix Time

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.

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:

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.

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!

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.

Wednesday, March 5, 2014

Troubleshooting Google Apps Migration for Microsoft Exchange – OAuth Authentication Failure



When trying to use the Google Apps Migration for Microsoft Exchange tool, I came across the following error:
Invalid Consumer Secret specified. Google Apps server has denied access to these credentials.
I checked and double-checked to make sure I had the correct OAuth Domain Key and Consumer Secret entered, and when it still failed, I re-generated the Consumer Secret.  Still no love.  After some searching, I came across this thread on Google’s Product Forums:
In a nutshell, when configuring your OAuth Domain Key, you have the option to “Allow Access to All API’s”.  For, me this box was checked.  Turns out when they say “All API’s”, they didn’t include some new ones that the latest version of the GAMME tool requires.  The tool looks for those API’s, can’t access them with the credentials you’ve supplied it, and falls on its face.  The fix involves you removing that checkmark next to “Allow Access to All API’s” and then heading to the “Manage Third-Party OAuth Client Access” page.  Type in your domain name into the “Client Name” field, and then paste the following into the “One or More API Scopes” field:
https://apps-apis.google.com/a/feeds/emailsettings/2.0/,
https://apps-apis.google.com/a/feeds/user/#readonly,
https://www.google.com/calendar/feeds/,
https://www.google.com/m8/feeds/,
https://www.googleapis.com/auth/apps.groups.migration,
https://apps-apis.google.com/a/feeds/migration/,
https://apps-apis.google.com/a/feeds/group/#readonly
Click the “Authorize” button, and that’s that.  Now the GAMME tool completes it’s diagnostic checks and will happily begin migrating the contents of your Exchange mailbox into Google Apps.

Monday, February 3, 2014

Annoying issue with * Stopping web server apache2 [Mon Feb 03 16:26:53 2014] [warn] _default_ VirtualHost overlap on port 443, the first has precedence ... waiting

To fix this issue just do this one, after which reload apache on the server


    # If you add NameVirtualHost *:443 here, you will also have to change
    # the VirtualHost statement in /etc/apache2/sites-available/default-ssl
    # to 
    # Server Name Indication for SSL named virtual hosts is currently not
    # supported by MSIE on Windows XP.

    NameVirtualHost *:443  # !important!
    Listen 443