Welcome to the most active Linux Forum on the web.
Go Back > Blogs
User Name



ssh authorized_keys command= script example

Posted 06-25-2015 at 12:48 AM by catkin

I found little prior art on the 'net regards ssh authorized_keys command= scripts so it may be useful to share the solution we use with our backup scripts.

The remote computer backslash-escapes command words using bash's printf %q. The received command is available to the command= script in envar SSH_ORIGINAL_COMMAND.

The command= script has three jobs:
  1. Validate the command against a series of custom regexes
  2. Convert the SSH_ORIGINAL_COMMAND string to individual
LQ 5k Club
Posted in Uncategorized
Views 231 Comments 0 catkin is offline

Bash scrippet to extract all eth* addresses from /etc/network/interfaces

Posted 12-02-2014 at 09:03 AM by catkin

I looked for such a script on the 'net and did not find so here's a solution, tessted with the edge case of an address line at the end of the file:



while read -r word1 word2 word3 word4 _
    case $word1 in  
         iface )
             [[ $word2 =~ $eth_regex && $word4 != dhcp ]] \
LQ 5k Club
Posted in Uncategorized
Views 228 Comments 0 catkin is offline

nagios plugin check_md_raid: adapt to treat routine checks normally

Posted 08-14-2014 at 06:29 AM by catkin
Updated 08-14-2014 at 06:30 AM by catkin (Vertical spacing adjustment)

The problem

At least on Debian, md arrays are routinely checked monthly by /etc/cron.d/mdadm. During the check, the nagios plugin check_md_raid generates critical alerts.

The solution

In /usr/lib/nagios/plugins/check_md_raid, change
re_clean = re.compile('^clean(, no-errors)? $')
re_clean = re.compile('^clean(, (checking|no-errors))? $')
LQ 5k Club
Posted in Uncategorized
Views 423 Comments 0 catkin is offline

Spideroak install pre-reqs on Slackware

Posted 03-27-2013 at 11:45 AM by catkin
Updated 03-27-2013 at 11:47 AM by catkin

Spideroak 4.8.4 has two run time requirements on Slackware 13.37:
  1. krb. Available as a SlackBuild and 64 bit only from
  2. keyutils. Available in 32 bit only from
The previous version I used, 9909, did not have these run time requirements.

keyutils home page:
LQ 5k Club
Posted in Uncategorized
Views 837 Comments 0 catkin is offline

Thunderbird "hyperlinks don't open" fix

Posted 12-31-2012 at 06:45 AM by catkin
Updated 01-04-2013 at 02:27 AM by catkin

A new installation of Thunderbird did not open hyperlinks in incoming mails. After ~3 days of looking for a fix, I found it in AndrzejL's Re: Fixing Skype / Thunderbird / Google Earth connection with Firefox on PCLinuxOS-Forums. This is to publicise AndrzejL's technique because I had found it early in the search for a solution and dismissed it as similar to others and/or not closely related to the problem.

AIUI AndrzejL's technique applies when there are no entries for HTTP and...
LQ 5k Club
Posted in Uncategorized
Views 640 Comments 0 catkin is offline


All times are GMT -5. The time now is 03:44 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration