scripted (bash) password changes for Samba users...

Submitted by donmc on Fri, 06/27/2014 - 19:49

I was excited to find this, so I am saving it here.

To change an smb passwd in a bash script:

echo -e "newpasswd\nnewpasswd" | (smbpasswd -s username)

And note the "\n" in there to push a newline between the two passwords...

For the unix (Linux) username:

echo -e "newpass\nnewpass" | (passwd --stdin username)

Use composer to install drush on Linux

Submitted by donmc on Sun, 06/15/2014 - 11:51
I have been building a new web server platform and tried to install drush using pear as I have in the past, but it is not NOT the recommended way to install it any longer (who knew?).
Drush has developed a huge cult following for it's ease of use in maintaining multiple drupal based sites very easily from the CLI. I cannot recommend drush highly enough - I can update the code for all of my sites in a few minutes - back in the gory days it would take me ages to do that... These steps worked flawlessly for me on Ubuntu 14.04 today.

Quick Image library check for PHP-GD

Submitted by donmc on Sat, 04/19/2014 - 15:16
donmc@etiikka:~$ php -r 'print_r(gd_info());' Array ( [GD Version] => 2.0 [FreeType Support] => 1 [FreeType Linkage] => with freetype [T1Lib Support] => 1 [GIF Read Support] => 1 [GIF Create Support] => 1 [JPEG Support] => 1 [PNG Support] => 1 [WBMP Support] => 1 [XPM Support] => [XBM Support] => [JIS-mapped Japanese Font Support] => )

Recently had to patch my web servers for this SSL Bug: "Heartbleed"

Submitted by donmc on Sat, 04/12/2014 - 12:47
You can install the patches (for Ubuntu 12.04 and up) with the following three commands: sudo add-apt-repository ppa:george-edison55/openssl-heartbleed-fix sudo apt-get update sudo apt-get upgrade
Any errors running "add-apt-repository" on Ubuntu 12.04, will probably mean that you need to install the "python-software-properties" package with the following command:
sudo apt-get install python-software-properties

Ubuntu DNS Issues with network-manager & dnsmasq

Submitted by donmc on Sat, 12/21/2013 - 14:01

This has been driving me crazy. Long delays on DNS lookups on Ubuntu 13.x desktop/laptops...
To fix dnsmasq errors, you should edit /etc/NetworkManager/NetworkManager.conf

sudo gedit /etc/NetworkManager/NetworkManager.conf
and comment out the line so it looks like this:

# dns=dnsmasq
in the "[main]" section. To comment out the line, put a '#' at the beginning of the line, then save the file.
Then restart network-manager.

Multiple copies per page printing of business cards in MS Publisher 2007/2010

Submitted by donmc on Mon, 09/02/2013 - 14:41

A bug I had noted in Publisher 2007 & 2010 is fixed by this simple change to the page size settings:

After following your steps I see the same problem in Publisher 2010 and Publisher 2007 Service Pack 2 but not in 2003 Service Pack 3. I see the 5 rows of 2 in 2003 as you are expecting in 2010 but not getting.

What type of Avery labels are you printing?