Operating System: Debian Lenny 5.0

This server needs an /opt directory for the package install, so the partitioning is a little bit different than a typical Linux setup. This is what mine ended up looking like:

Filesystem Size Mounted on
/dev/sda1 2G /
/swap X /swap
/dev/sda9 (rest) /home
/dev/sda6 2G /opt
/dev/sda7 1G /tmp
/dev/sda5 3G /usr
/dev/sda8 2G /var

Setup a few packages necessary for the server first.

apt-get install samba gamin alien

Now users and groups need to be added for permissions and the Samba folder share access.

groupadd quickbooks
useradd -d /home/user1 -g quickbooks user1
useradd -d /home/user2 -g quickbooks user2
useradd -d /home/user3 -g quickbooks user3
useradd -d /home/user4 -g quickbooks user4
smbpasswd -a user1
smbpasswd -a user2
smbpasswd -a user3
smbpasswd -a user4

Create the folder where the QuickBooks data files will be stored and set the appropriate permissions.

mkdir /home/qbdata
chown user1:quickbooks /home/qbdata/
chmod 775 /home/qbdata/

Now configure Samba by moving the built in configuration and writing your own.

cd /etc/samba
mv smb.conf smb.conf.orig
cp smb.conf.orig smb.conf
vi smb.conf

The configuration file should read:

[global]
   workgroup = WORKGROUP
   server string = %h server
   dns proxy = no
   log file = /var/log/samba/log.%m
   max log size = 1000
   syslog = 0
   panic action = /usr/share/samba/panic-action %d
   encrypt passwords = true
   passdb backend = tdbsam
   obey pam restrictions = yes
   unix password sync = yes
   passwd program = /usr/bin/passwd %u
   passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
   pam password change = yes

[qbdata]
   path = /home/qbdata
   comment = Quickbooks Enterprise database share
   valid users = user1,user2,user3,user4
   public = no
   writeable = yes
   printable = no
   create mask = 0765

Now restart Samba and test the permissions using a Windows client. You should be able to see the logs created by each client and who was accessing the share.

/etc/init.d/samba restart
tail /var/log/samba/log.smbd
tail /var/log/samba/log.rst-win-utl3

Using Alien, we’ll create a deb package from an rpm so it can be installed. Some other directories and files need to be created for logging purposes since Debian uses rsyslog and QuickBooks won’t create them on its own.

cd /usr/src
wget http://http-download.intuit.com/http.intuit/CMO/qbes/resources/qbdbm-20.0-5.i386.rpm
alien qbdbm-20.0-5.i386.rpm
mkdir /var/lock/subsys
dpkg -i qbdbm_20.0-6_i386.deb
touch /var/log/qbdbfilemon.log
touch /var/log/qbdbmgrn_20.log
touch /var/lock/subsys/qbdbfilemon
touch /var/lock/subsys/qbdbmgrn_20

We need to add a line to the syslog configuration in /etc/rsyslog.conf, just put it at the end.

daemon.*                        -/var/log/qbdbfilemon.log

Setup the QuickBooks binaries to startup automatically.

update-rc.d qbdbfilemon defaults
update-rc.d qbdbmgrn_20 defaults

Modify the file /opt/qb/util/qbmonitord.conf in include the directory where the QuickBooks data will live.

/home/qbdata

Restart the server and you should be able to run a ps -e and see the following processes running indicating the server is up. There also should be a /home/qbdata/qbdir.dat file created automatically.

 1987 ?        00:00:01 qbmonitord
 1994 ?        00:00:02 gam_server
 1995 ?        00:25:40 QBDBMgrN_20