Samba: Working Around QuickBooks 2006 Incompatability

Want to support HowtoForge? Become a subscriber!
 
Submitted by PaulJulio (Contact Author) (Forums) on Fri, 2006-01-13 09:46. :: Samba

PLEASE NOTE: This HowTo does not address multi-user mode. If multi-user mode is essential to you, I'm sorry I wasted this much of your time, but please don't let me take up any more.

This HowTo addresses the incompatability that QuickBooks 2006 has with Samba-based file-sharing (the Linux de-facto standard for domain control and file sharing).

Summary: Create a new user, group and share. Access the QuickBooks files via the new user by logging onto the share with its credentials.

System:

  • Server: Mandriva Linux 2006. Stock configuration.
  • Clients: Mostly XP pro, but some Win 2000. All members of the domain.

    Symptoms: After upgrading to QuickBooks Premier 2006, User A opens the QuickBooks file for Company XYZ, and gets access. User B tries to open the QuickBooks file for Company XYZ and finds that the program seems to stall for 15 to 30 seconds, then receives a non-helpful error message that may eventually lead to a web page where Intuit states they don't support Samba file sharing. If User B opens the file first, the situation is reversed.

    Research (Net): I'm fairly good at researching problems on the internet, but I couldn't find one post that made it sound like it was even possible to get this type of setup working. (Thus I'm writing my first HowTo - be gentle folks, I'm just trying to give back.)

    Research (Server): Checked QuickBooks data files and found that they were owned by the linux/samba user who first opened the file (this gave me my first glimmer of hope).

    Preparation:

  • Created a user and group named quickbooks in linux and samba.
  • Created a new share on the server (make a new directory near your other share directories, then go back into webmin and create a share for it). Made sure the quickbooks user had read/write access.
  • Created a symbolic link in the new share to each directory that had QuickBooks data files. (try ln --help)
  • Gave ownership to quickbooks:quickbooks (NOTE: I don't know if group ownership is neccessary. I do know that in my case User A and User B were in the same group, and group ownership wasn't a big deal for my client in this situation.)
  • Drank a Diet Dr Pepper while waiting for Samba to refresh the info. (Restarting samba may break the connection all your users have to their network drives. If no one else is on or you just don't like people in general, you can restart the samba service.)
  • Mapped a new drive (Q) on the client computer, but chose 'Log on as' and entered the quickbooks user and password. NOTE: Win XP would not let me use the name of the samba server, since I was already logged on to the domain with a set of credentials. I used the IP address of the server and everything went ok. Example: \\192.168.0.111\QuickBooks

    Result:

  • Opened a file via the Q drive on User A's computer. Success. Closed the file.
  • Mapped the Q drive on User B's computer and opened the same file. Success. Left file open.
  • Tried to open the same file on User A's file. QuickBooks determines that the file is aleady open and displays a helpful error message. Success.
  • Tried to convert a file to multi-user mode. Failure. (Two out of three isn't bad, though.)

    False Starts: Tried to use Run As to run the .exe as the quickbooks user: didn't have access to network drives after program start and generally played havoc with my domain log-on.

    Possible Alternative: Use a native Linux mechanism to change ownership of files when they are needed (ie. bash script)

    Determination: QuickBooks uses a file-locking mechanism that is not compatable with Samba because it involves changing file ownership. Shame on you, Intuit.

    Complicating Factors:

  • Anyone with access to the drive has read/write access via a log-in that is being shared. Sounds like a bad security decission.
  • If separate access is needed for separate sets of files, a separate user, group and share may be needed for each. If a single user needed access to more than one group of QuickBooks data files, they would need more than one mapped drive.

    Providing multi-user access does not seem possible at this time, since it depends on the server to cooperate.

    Mitigating Factors:

  • QuickBooks allows for passwords on individual data files. Helps with the access issue, not the security issue.

    Disclaimer: This worked for me, but it could erase all your data and expose your deepest, darkest secrets to your mother-in-law. I'm just trying to help.

    Thanks to: The Mandriva folks and Altoid, who got me started in Linux; the Samba folks for a very solid product; the Webmin folks for making my life easy; all the contributors who make using Linux a possibility; the folks at Winders for keeping me in business :)


  • Please do not use the comment function to ask for help! If you need help, please use our forum.
    Comments will be published after administrator approval.
    Submitted by sgla1 (registered user) on Mon, 2006-10-23 07:59.
    My company runs peachtree 2006 accounting software in network (multi-user) mode, with data files stored on a samba server. It works as well with Linux as it does with Windows. There are some lockup problems due to the Windows clients not releasing files after an app closes, but at least with samba you can close lingering connections from clients. This may not be an option for some due to corporate policy. However if you can change over, you will find fewer bugs and better support to boot. Cheers
    Submitted by Anonymous (not registered) on Tue, 2006-04-11 15:40.

    First of all, nice job on the article. As far as multi-user mode goes, this isn't just a problem with Quickbooks 2006, but really with many previous versions as well because of Quickbooks' means of locking the database or change control in multi-user mode. The answer to this is in disabling Samba's locking on that particular share. Try disabling oplocks on that share that you're using for the Quickbooks database in order to use the multi-user mode as this tells Samba not to worry about controlling access to this share in any way so that Quickbooks will handle access only. You could even specify the lack of oplocks for just the file and not the share in general by using the "veto oplock files = " option in smb.conf. This is the reason that Samba and Quickbooks aren't automatically compatible because Samba wants to control oplocking for performance reasons in a multi-user network. Anyways, hope this helps.


    Cheers,

    Kyle

    Miami, FL

    Submitted by Anonymous (not registered) on Tue, 2006-02-07 21:59.

    I found, with out making other changes to samba config, that I can get QuickBooks 2006 Pro to work in a multi user mode as outlined here:

    http://www.quickbooks.com/support/faqs/qb2006/829e206e.html

    Note: There simply has to be a user logged on to the server (not QB) that has owner permissions on the .qbw file AND has launched (but doesn't need to be running) QuickBooks in the alternate host mode described above.

    Personal Note: Intuit may just like Microsoft a little too much :)

    Submitted by Anonymous (not registered) on Thu, 2006-01-19 06:57.

    I have three machines with QB2006 installed. The two that have not had the any updates installed can connect to a Samba share. The one that is fully updated gives this message when attempting to connect to the Samba share:

    "You are trying to create, open, or use a company file that is located on another computer. Your computer is set up to allow access to only those company files that are located on your computer"

    GROAN!!! Why did Intuit mess up a decent product?

    Submitted by Anonymous (not registered) on Fri, 2006-01-13 17:30.

    Thanks for this little how-to. It has some very good info on things to watch out for with QB on samba. Just wondering are you using any of the following directives on your quickbooks share?


    create mask = 0666
    force user = quickbooks # this is a really powerful option.
    force create mode = 0666
    directory mask = 0777
    force directory mode = 0777

    These might make your and your clients life easier.

    Regards,

    cooper