Windows IT Pro is the authoritative and independent resource for windows nt, windows 2000, windows 2003, windows xp. Features a collection of resources and magazines for windows IT professionals.
  
  
  Advanced Search 


April 2001

Learning Samba for File Sharing


RSS
Subscribe to Windows IT Pro | See More Interoperability Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!

Begin the configuration process by specifying the server's name (up to 15 characters) at the netbios name parameter and the server's workgroup at the workgroup parameter in the global section. These configurations get your Samba server running. For example,

[global]
	netbios name = <sambasvrname>
	workgroup = <workgroupname>

Setting the netbios name parameter isn't absolutely necessary because Samba will default to the server's host name. However, you usually will want to set this parameter because NetBIOS naming conventions assume that host names are unique across subnets, and such isn't always the case for Linux host names. For testing purposes, you might want to use an unused name for the workgroup name. However, after you've configured Samba properly, you then might want to change the value of the workgroup parameter to an existing workgroup or something more appropriate for your network.

Next, you need to specify how Samba will authenticate users. Samba supports two types of authentication: share and user. Share-level authentication requires either that each user have an SMB account on the Samba server or that you set the given share to allow anonymous user access. (You use the Samba smbpasswd tool to create SMB accounts.) These requirements are the only share-level restrictions for access to shares; if users have SMB accounts, Samba, at share-level security, can't restrict these users from accessing shares. These limited restrictions differ from Win9x share-level access, which lets you assign passwords for shares.

The more powerful and secure user-level access lets administrators specify a list of users or groups that can access a share. (Share-level security grants access at the server level, whereas user-level security grants access at the share level.) Samba subdivides user-level access into user and domain for user authorization. When you specify user-level access as user, Samba refers to its account database to authorize a user. When you specify domain, Samba authorizes users against the domain's PDC. Administrators who use NT would obviously prefer user-level security to use their existing NT domain infrastructures. However, configuring user-level access with Samba is more complicated than configuring share-level access. For this article's purpose of demonstrating how easily you can create a disk share with Samba, setting security as share-level is a satisfactory configuration:

security = share

If your network uses WINS, you also need to specify the IP address of your WINS server at the wins server parameter:

wins server = <10.x.x.x>

After you configure the global section, make sure that Samba starts properly and that you can browse the server from a Windows client. When you boot your Linux server, use the following Linux command to start the init.d script that starts Samba:

# /etc/rc.d/init.d/smb start

After the init.d script reports that Samba started successfully, wait a few moments for the Samba server to register with the WINS server, then use the Net View command on a Windows client to view the Samba Server:

C:> net view \\<sambasvrname>

The command results in the following output:

Shared resources at \\<sambasvrname>
There are no entries in the list.

As you add shares, however, the output will include information about the shares Samba exports.

If the command fails, you likely have a browsing problem. Try viewing the server with the Net View command and the server's IP address. If the command with the IP address works and the command with the NetBIOS name doesn't, verify that you configured the wins and workgroup parameters correctly. If the command with the IP address also fails, double-check that Samba is running and that you've configured Linux properly.

   Previous  1  [2]  3  4  5  Next 


Reader Comments
Actually, Samba uses four types of authentication, not two. Those are USER, SHARE, SERVER, and DOMAIN.

Sean Irish July 19, 2001


You must log on before posting a comment.

If you don't have a username & password, please register now.




Top Viewed ArticlesView all articles
Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...

How can I stop and start services from the command line?

...

PsExec

This freeware utility lets you execute processes on a remote system and redirect output to the local system. ...


Windows OSs Whitepapers Why SaaS is the Right Solution for Log Management

Related Events Windows, Unix, Linux Interoperability

Check out our list of Free Email Newsletters!

Windows OSs eBooks Understanding and Leveraging Code Signing Technologies

A Guide to Windows Certification and Public Keys

SQL Server Administration for Oracle DBAs

Related Windows OSs Resources Become a VIP member of the Windows IT Pro community!
Get it all with the VIP CD and VIP access. A $500+ value for only $279!

Subscribe to Windows IT Pro!
Solve your toughest technical problems with our experts and access 10,000 + articles online. 30% off

Monthly Online Pass - Only $5.95!
Get instant access to 10,000+ articles from Windows IT Pro Magazine!

TechNet Virtual Labs
Evaluate and test Microsoft's newest products.


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro Windows Dev Pro IT Job Hound ITTV
IT Library Technology Resource Directory Connected Home Windows Excavator Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 Copyright © 2008 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing