Errors Copying Files from Mac to Ubuntu Samba Share

So I get a shiny new printer at the bargain basement price of $70 so I can do PDF scans for my business.  It works fine and then when I try to copy the PDF’s from my Apple Mac Mini to my Ubuntu server running the latest Samba I get the oh-so-helpful Windowsique error of:

The operation can’t be completed because you don’t have permission to  access some of the items.

Gee, that helps.  So I go through the usual process of checking the file permissions, samba server settings, directory permissions and so on.  Of course everything looks fine.  After playing Google Bingo I find a reference at http://www.macosxhints.com/article.php?story=20100405023255445 that I need the following setting in my smb.conf.

unix extensions = no

Apparently the Mac is adding some extended attributes to the files during the copy and Samba didn’t like that.  After restarting samba and disconnect/reconnect the mac shares I’m good to go.

MySQL and Debian-Sys-Maint

So during a migration of mysql databases from one server to another I did a complete dump of all databases from server1 and then loaded them onto server2.  Now this included the “mysql” table which stored the debian-sys-maint user information.  Once the databases were loaded and I did a clean restart of mysql I received the following errors:

root@sandbox:/data/docs# /etc/init.d/mysql restart
 * Stopping MySQL database server mysqld        [ OK ]
 * Starting MySQL database server mysqld        [ OK ]
 * Checking for corrupt, not cleanly closed and upgrade needing tables.
/usr/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)'
root@sandbox:/data/docs# ERROR 1045 (28000): Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)

It turns out that the debian-sys-maint user stores his credentials in /etc/mysql/debian.cnf.  Inside of that file will be a password and you’ll need to run the following db update:

GRANT ALL PRIVILEGES ON *.* TO 'debian-sys-maint'@'localhost' IDENTIFIED BY '<that password from the file>' WITH GRANT OPTION;
FLUSH PRIVILEGES;

After that you should be able to do a clean restart of mysql and not run into any errors.