Setting up a Samba Server on Caldera OpenLinux
Setting up a Samba Server on Caldera OpenLinux
Jeff Christensen
3-24-2000
The following document explains how to set up a file server Win95,
Win98, or WinNT clients; how to synchronize passwords between Windows and
OpenLinux; and how to setup a raw printer to be hosted by the Samba server.
By following these steps, a Windows user will have read/write access to
his/her own "public" directory on the file server. All Windows users will
also have read/write access to a public directory.
1. Setting up the Samba Server
-
Change to the /etc/samba.d directory.
-
Copy the smb.conf.sample file to smb.conf.
cp smb.conf.sample smb.conf
-
Edit the smb.conf file and change the workgroup entry to match the work
group on the Windows machines that will access the Samba server.
-
If you are using Windows 95 OEM Rev B, Windows 98, or Windows NT with Service
Pack 3, remove the semicolon in front of the following two lines, otherwise
leave them commented out as earlier versions of Windows do not have encrypted
passwords.
encrypt passwords = yes smbpasswd file = /etc/samba.d/smbpasswd
-
Save the changes made to the smb.conf file.
-
While still in the /etc/samba.d directory create a samba password file:
mksmbpasswd < /etc/passwd > smbpasswd
-
The smbpasswd file contains all of the users on your Linux system.
-
To add users to the list of those who can access the OpenLinux system using
Samba, use this command:
smbadduser Linux-username:Samba-username
-
Next, create a "Public" directory in each user's home directory that is
owned by that user.
- Change to the user's home directory.
-
Create the "Public" directory (note the capital P).
mkdir Public
-
Change the owner of the Public directory.
chown owner Public
-
Create a public directory that all Samba users can access.
mkdir /home/public
-
Next start Samba (must be logged in as root)
/etc/rc.d/init.d/samba start
2. Synchronize the Samba and OpenLinux passwords
-
Samba can be setup to synchronize the Samba and OpenLinux passwords so
that when a user changes their password the change will affect both Samba
and OpenLinux.
-
This will only work with the encrypted passwords set to yes.
-
Remove the semicolon in front of the following lines:
unix password sync = Yes passwd program = /usr/bin/passwd %u
passwd chat = *New*UNIX*password* %n\n *ReType*new*UNIX*password* %n\n
*passwd:*all*authentication*tokens*updated*successfully*
-
Stop and restart Samba.
/etc/rc.d/init.d/samba stop /etc/rc.d/init.d/samba start
3. Setup a raw printer device hosted on the Samba server
-
A raw printer is a printer setup in Samba that will allow the use of Windows
printer drivers as opposed to the postscript printer device.
-
To setup a raw printer, you will first need to create the printer using
coas or lisa.
-
It does not matter which printer you select to install, because no filters
will be used in setting up the raw printer device.
-
After you have installed the printer, go into "/etc" and edit the printcap
entry you just created, changing it to look like this (if you named it
something other than raw, the entry name and spool directory should be
changed here to match):
raw:\ :rw:sh: :lp=/dev/lp1 :sd=/var/spool/lpd/raw :fx=flp
-
Next edit your /etc/samba.d/smb.conf file, locate the [printers] section
and add the following line:
print command = lpr -b -P%p %s
-
Save the changes to /etc/samba.d/smb.conf and start and stop the samba
and lpd demons as root.
/etc/rc.d/init.d/lpd stop /etc/rc.d/init.d/lpd start /etc/rc.d/init.d/samba
stop /etc/rc.d/init.d/samba start
|