dcsimg
December 8, 2016
Hot Topics:

Doing the Windows 2000 Samba

  • December 21, 2000
  • By Stew Benedict
  • Send Email »
  • More Articles »

Setting up Samba

Either download a binary RPM for your distribution, or get a source tarball and build from source. I went with the source for version 2.2.0, and built it with the following configuration options:
	./configure --prefix=/usr --libdir=/etc \
	--with-lockdir=/var/lock/samba --with-privatedir=/etc \
	--with-swatdir=/usr/share/swat --with-smbmount  \
	--with-quotas --with-pam
This puts my binaries in /usr, and the configuration files in /etc. You may want to put the binaries in /usr/local or /opt. I created the "private" subdirectory in /etc for smbpasswd and the files created when Samba acts as a domain controller. Once configure finishes, do the following:
	make
	make install (as root)
Now you need to create /etc/smb.conf. The following is extracted from mine:
[global]

debuglevel = 1
netbios name = moe
workgroup = AYSWNET
server string = Samba Server - Moe
hosts allow = 192.168.192. 127.
printcap name = /etc/printcap
load printers = yes
print command = /usr/bin/lpr -r -P%p %s
lpq command = /usr/bin/lpq -P%p
lprm command = /usr/bin/lprm -P%p %j
guest account = ftp
# this tells Samba to use a separate log file for each machine
# that connects
log file = /var/log/samba/log.%m
security = user
encrypt passwords = yes
smb passwd file = /etc/private/smbpasswd
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*
socket options = TCP_NODELAY 

[homes]
   comment = Home Directories
   browseable = yes
   writable = yes

[printers]
   comment = All Printers
   path = /var/spool/samba
   public = yes
   browseable = yes
   guest ok = yes
   writable = yes
   printable = yes

[xfers]
   path = /smbshares/xfers
   public = yes
   only guest = yes
   writable = yes
   printable = no
   browseable = yes 
   create mode = 0777
I'm not going to cover all the options. All printers configured on the Linux server will be available to Windows clients. The default config file smb.conf.default in your distribution has many comments for these options, and the man page discusses them in detail:
	man smb.conf
To start Samba, there are 2 daemons:
	smbd -D
	nmbd -D
smbd is the server to provide SMB/CIFS services to clients. nmbd is the NetBIOS name server to provide NetBIOS over IP naming services to clients.

Normally these will be started by an init script in /etc/rc.d/init.d.





Page 2 of 5



Comment and Contribute

 


(Maximum characters: 1200). You have characters left.

 

 


Enterprise Development Update

Don't miss an article. Subscribe to our newsletter below.

Sitemap | Contact Us

Thanks for your registration, follow us on our social networks to keep up-to-date
Rocket Fuel