[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]
Re: samba?
On Mon, Mar 05, 2001 at 08:58:10PM +0530, Harshal Vaidya (CTS) wrote:
>
>
>hi all,
>
> i am interested in communicating with the winnt an win2k machines
>using the SMB protocol.
> i need help in this .
> any body who has worked in this field please mail me offlist.
The configuration file that we will use to start SAMBA follows. It
belongs in /usr/local/samba/lib/smb.conf:
[global]
#
# Set this to your domain name:
workgroup = sarai
#
# This is only a comment; treat it, however, like you would:
server string = Samba Server v2.0.7
#
# The following line, if uncommented, would restrict access
# to the machines on a private class C network:
# hosts allow = 127. 192.168.10.
#
# Maintain a separate log file for each client that
# connects (by computer name). If you want a single
# log file, remove the '.%m' from the end.
log file = /usr/local/samba/var/log.%m
#
# How large can a log get (in kB)?
max log size = 50
#
# Computer Name:
netbios name = SAMBA
#
# Who are the domain controllers? List the PDC, followed
# by all the BDCs, separated by spaces. Alternatively,
# this could be left set as is and SAMBA will determine
# who the Domain Controllers are, like Windows NT does.
password server = *
#
# What type of security are we using?
security = DOMAIN
#
# ALWAYS, ALWAYS encrypt passwords. No clear-text
# passwords should ever even see the light of day.
encrypt passwords = yes
#
# Makes the speed better on some computers. If you have
# trouble, remove this line first:
socket options = TCP_NODELAY
#
# Try to avoid an election by refusing to start one, or
# to ever participate in one.
local master = no
preferred master = no
#
# Who is your WINS server? You should already have a WINS
# server in place (either that or you are wasting too
# much bandwidth on broadcasts).
wins server = 192.168.1.31
#
# If DNS cannot find a name, should WINS try?
dns proxy = no
#================== Share Definitions ===================
# Homes is a special share that shares out the home
# directory for each valid user and also creates a
# share named 'HOMES' that automatically maps to the
# correct home directory for the current user.
[homes]
comment = Home Directories # Commentary only
browseable = yes # Seen in explorer?
writable = yes # Read/Write?
#
# Another share. This one is not magical like HOMES. This
# illustrates how to share something without advertising
# that it is shared. You can still connect to \\SAMBA\LOCAL, but
# you can't browse to find it. This is similar to appending a $ to a Wind
ows
# share name.
[local]
comment = useless # Comment is useless here
browseable = no # Do not show in browser
writeable = no # Allow no changes
path = /usr/local # Share this path
Before we can start SAMBA, we need to join the domain. This entails
logging into the domain as the computer account and setting a password
that will be used later. Thankfully, SAMBA can do this for us with:
/usr/local/samba/bin/smbpasswd -j DOMAIN -r <PDC>
(Replace <PDC> with the name of your Primary Domain Controller).
Once this configuration file has been created and the domain has been
joined, we only one step remains. SAMBA requires each user who will be
accessing the computer remotely to have a user ID on the SAMBA server.
The reason for this is that when the NT user 'orbaker' connects, SAMBA
forks for the connection and sets its user ID to 'orbaker' to create
an equivalency. Be certain that you have the same username for both
Windows NT and your SAMBA server (NOTE: The passwords need not be
identical).
Now, run the commands:
/usr/local/samba/bin/smbd -D
/usr/local/samba/bin/nmbd -D
You should be able to browse your SAMBA server from the Windows
explorer interface. When you connect to the server, you should see the
shares 'HOMES' and one for your username. Everyone sees his or her
home directory and HOMES. The share LOCAL shouldn't be listed here,
but if you right-click on 'Network Neighborhood' and select 'Map
Network Drive' you should be able to map a drive to '\\SAMBA\LOCAL'.
To experiment a bit more with shares, try some of the following:
* Add the line 'hide dot files = yes' to one of the share
definitions. This should make hidden files hidden (if your
workstation has the 'Show All Files' option set, you will still
see them, although their properties will show that they are
hidden).
* Your samba/private directory has some sensitive information in it.
Try adding the line: 'veto files = /private/' to the definition
for the LOCAL share. This should keep /usr/local/samba/private
from being accessed from Windows stations. Try creating the
directory: /usr/local/private. This directory should also be
inaccessible.
--
Paul's Law:
You can't fall off the floor.
................................
Pankaj Kaushal <pankaj@xxxxxxx>
Proud to use GNU <www.gnu.org>
- References:
- samba?
- From: Harshal Vaidya (CTS)