Vous êtes sur la page 1sur 14

Windows Interoperability

Chris CJ Janneck
CSE 398 Sys Admin
4/19/2004

What can Samba do?


Allow for peaceful coexistence between
Windows and Linux/UNIX systems
regarding:
File sharing
Printer sharing
Distributed Filesystem sharing
Client Authentication
Provide/Assist with Windows Internet Name
Service (WINS)

How does Samba do it?


SMB = Server Message Block

SMB is an extension added by MS to allow DOS


to redirect calls to NetBIOS
NetBIOS = (crude) interface between network
and application

CIFS = Common Internet File System


Different paradigm than NFS
Based on protocols from SMB

SMBFS

Allows Linux to treat CIFS just as another foreign


FS

Why care about Windoze?


Its everywhere (dun dun DUN!)
Chances are, more of your clients will be
using it than *NIX
It has brought computing to the average
Joe billions of em
It uses inferior multi-user technology,
and we should help them where possible
Its not leaving anytime soon get over it

Everybody dance now. (p798)


Samba runs as a service; usually needs
little attention
Can check using smbstatus

Only config file: /etc/samba/smb.conf


Two daemons
smbd file and print services,
authentication
nmbd NetBIOS name service, browsing

What will Samba do here?


Can do
File sharing
Printer sharing
Distributed Filesystem sharing
Client Authentication
Provide/Assist with Windows Internet Name
Service (WINS)
Backup PCs (smbtar)

Will do only setup of file sharing today

File Sharing Setup


Install Samba
V2 series: 2.2.8a latest
V3 series: 3.0.2a latest

Modify /etc/samba/smb.conf
Add users and set passwords
Add user using useradd
Set user password using passwd
Set Samba password using smbpasswd

Restart Samba
/etc/rc.d/init.d/smb restart

/etc/samba/smb.conf
Standard, simple scheme
[share]
attribute = value
# or ; denotes a comment
Sample Headings:
global global settings, network IDs
homes users home directories
printers printing utilities
Music mp3 and other audio files
everyone open RW share to all

Shares and Attributes


global
workgroup = name of Windows network group
netbios name = name to appear in Windows Network
Neighborhood
hosts allow = list of IPs (whitespace-delineated) to have
access to SMB shares
encrypt passwords = yes, for Win98+; no for Win95-

homes
browseable = yes, will map directly to /home/user; much
like My Documents ability on campus
writable = yes (same as read only = no); by default,
all shares are read-only

Common Shares and Attributes


Music

path = path to music files


public = yes, will allow RX access to all users
write list = list of users that can write
invalid users = list of users that cannot access
Note: users are names from Windows logon, and are caseinsensitive.

everyone

path = path to RW storage space


Often also set read only = no and browseable = yes
Note: gives full RW access to anyone be careful

printers

printable = yes
path = /var/spool/samba

Accessing Samba/Win Shares


From Windows

Using Network Neighborhood


Act and look like normal shares

From Linux/UNIX

Using a file manager (like Konqueror)

Often very slow, requires re-entering of passwords

Using network app like Komba2 or


LinNeighborhood
Mount them
in /etc/fstab

//SMB_server/share local_mount_dir smbfs options 0 0

mount t smbfs o username=name


//SMB_server/share mount_dir

Egotistical Reasons
So you dont feel like sharing with
others?
SMBFS now allows RW access to NTFS
Can have fully-functional and non-exclusive
dual-boot machines

Do not have to lose resources (printers,


files, etc.) when developing under Linux
or Win

Resources
Plenty available, including books 100s
of pages long just on Samba!
http://www.mandrakeuser.org/docs/connect/
csamba.html
http://www.samba.netfirms.com/index.htm
http://www.samba.org
Tons of documentation, including Using Samba
by OReilly, all online

Miscellaneous Issues
Useful Windows tools
ssh clients
X
W
indows emulators

Dual-booting
Running Windows under Linux or vice versa
vmware (recently purchased by EMC)
http://www.plex86.org/
OpenOffice.org
WINE
www.cygwin.com

Vous aimerez peut-être aussi