Notes
Outline
Windows Interoperability with UNIX/Linux using SAMBA
Masaru Ryumae,
MCT, MCSE+I, MCSE(W2K), CCNA, Net+
masaru_ryumae@agilent.com
Agilent Technologies
Goal for tonight
To get used to Linux environment
Play with Samba
Questions to you all
How many people are using Linux today?
How many people are using Samba today?
How many people are planning on using Linux and/or Samba in the near future?
Topic Contents
What is SAMBA?
What can SAMBA do for you?
Supported Platforms
Why would you use SAMBA?
SAMBA installation / SAMBA mount usage
SAMBA / WINS configuration file
Smb.conf GUI / Startup Configuration
SAMBA Troubleshooting steps
SAMBA Performance stats
SAMBA 3.0 / References
Q&A
What is SAMBA?
A piece of software run on UNIX/LINUX based systems
Current version is 2.2.5.
Free software (GNU General Public License)
What can SAMBA do for you?
File/Print resource sharing with Windows Platform
WINS function
NT4 PDC function
MS-DFS root server
Built-in support for ACLs on file/print shares
Many others
Supported Platforms
HP-UX
Linux distributions (RedHat, Mandrake…)
Solaris
SCO
MacOS X
NetBSD, FreeBSD, and Open BSD
MPE
Many others
Why would you use SAMBA?
Replace Windows based File/Print/Web servers for free
Password synchronization between UNIX and Windows NT platform
Home directory server for both UNIX and Windows clients
Senario 1
I have a Linux web server that I need to manage. I have a Windows 2000 Pro system at my desk. How can I easily upload files to the web server?
- Why not FTP?
Senario 2
We can not afford to spend money on server OS license, and we use Linux. How can we make the Linux server to act as a file server that our Windows clients can utilize?
Senario 3
We have a Linux system with a print device attached to it. How can we easily share the print device so that some of our Windows clients can print to it?
Senario 4
I have a small network at home with 4 computers. I would like to have a central file server which I will only back up.
SAMBA Installation 1
Of course, we need to install the SAMBA bits before you use it, but is it already installed??
rpm –qa | grep samba
ps aux (or –ef) | grep smbd (and nmbd)
ll /usr/local/bin/samba or /opt/samba
SAMBA Installation 2
1) rpm install or source compliation
2) Check smb.conf with testparm
3) Start smb daemon (service)
4) Test share (same user ID in Win/Lin or user map file) -> smbpasswd -a
- MACHINE.SID
SAMBA Mount Usage
With a normal workstation installation, you can connect to Windows share from a Linux box (may not work with XP)
1) Share folder in Windows
2) Create a user acct in Windows
3) su – and (modify /etc/hosts)
4) mount –t smbfs –o username=masaru //system/share /mnt/windows
5) df
SAMBA Configuration File
# Global parameters
[global]
        workgroup = HP
        netbios name = TOKYO
        server string = Samba server on the system Tokyo
        security = DOMAIN
        encrypt passwords = Yes
        password server = *
        syslog = 0
        log file = /var/opt/samba/log.%m
        max log size = 1000
        local master = No
        wins server = ***.***.***.***
        guest ok = Yes
        case sensitive = Yes
        short preserve case = No
        dos filetime resolution = Yes
        guest account = smbnull
Testparm to check configuration syntax errors!!
Possible User Acct Issue?
My Linux user account name and Windows account names are not the same, and we won’t be matching them up… What’s my option?
Username map = /etc/samba/smbusers
Unix name = SMB name1 SMB name2…
Root = administrator admin
User or Domain Authentication?
4 different configuration options – Share, User, Server and Domain
In this demo, the configuration is “User”
In the domain environment, use “Domain”
Follow the normal process of adding a computer account, then “smbpasswd –j DOMAN_NAME –r DC_NAME”
WINS Configuration
wins support = yes
/var/cache/samba/wins.dat
WINS DB contents:
“MASARU#00” 1029690532 192.168.4.128 64R
“MASARU#03” 1029690533 192.168.4.128 64R
“MASARU#20” 1029690538 192.168.4.128 64R
Added a new disk?
Use fdisk to configure disk
Create a share in smb.conf
Stop and restart smb
Test shares
GUI for smb.conf
SWAT
- Add /etc/xinetd.d/swat
- May need to copy /usr/sbin/swat
>>> Hard to configure!!
Webmin is easy, just install and ready to go!
Create a new share
Create a new share with webmin
SAMBA Startup Config
chkconfig –list smb
smb 0:off 1:off 2:off 3:off 4:off 5:off 6:off
chkconfig –level 35 smb on
smb 0:off 1:off 2:off 3:on 4:off 5:on 6:off
Or start smb manually when needed
service smb start
SAMBA Troubleshooting Steps
1) ping and testparm
2) ps –ef |grep smbd
smbclient –L localhost
smbclient //192.168.4.128/i386 –U mryumae
3) ps –ef |grep nmbd
nmblookup –U 127.0.0.1 MR2804LPRH
nbtstat -n
You need more?? See the troubleshooting doc from Samba web site……
SAMBA Performance Stats 1
SAMBA Performance Stats 2
What’s in SAMBA 3.0 and beyond?
Current version, 3.0 Alpha
Better support for non-English clients
NT 4 PDC / BDC SAM replication
NT 4 style trust relationship
Compatibility with W2K AD?
SAMBA / Linux References
www.samba.org
SAMS Tech Yourself Samba in 24 hours (Second edition)
O’Reilly Using Samba
www.redhat.com
www.linuxiso.org
www.webmin.com
SAMBA Summary
What is SAMBA?
What can SAMBA do for you?
Supported Platforms
Why would you use SAMBA?
SAMBA installation / SAMBA mount usage
SAMBA / WINS configuration file
Smb.conf GUI / Startup Configuration
SAMBA Troubleshooting steps
SAMBA Performance stats
SAMBA 3.0 / References
Questions & Answers?