[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: What is the best way to install Samba

On Monday 18 December 2006 13:32, schmity wrote:
> Ok I have my debian machine connected to a XP machine through a router.
>  I have made several attemps to install samba using apt-get and I have
> modified the smb.conf on several occations.  My first thought was to
> start with a fresh reinstall of Samba so that I could start with the
> original smb.conf file, but a simple apt-get remove -> apt-get install
> does not replace the original smb.conf file.  I am lost on this one.
> Questions,
> Do I need a static IP? 
Not necessary. You can have Samba shares on Dynamic IP.

> and if so How? 
This depends on your network setup. If you dont know your network setup, its 
best not to change anything.
If you do know your network setup, you can modify the 
file to add the static IP to your network card. Once again, a reminder, do NOT 
modify this file without knowing what you are doing.

> How do I start with a fresh installation of Samba?
dpkg -P samba samba-common 
will remove samba and delete the conf file.

apt-get install samba
will then do a fresh installation.

To get samba working, you must know the windows work group name.
in XP you can get this by right clicking on the My Computer icon and get the 
properties, then go to the Computer Name tab.

If its a simple folder share, the following config lines can do it. (Leave the 
other lines as it is)

# Server Naming Options:
# workgroup = NT-Domain-Name or Workgroup-Name
   workgroup = Name_of_your_windows_work_group

# netbios name is the name you will see in "Network Neighbourhood",
# but defaults to your hostname
  netbios name = Name_of_the_debian_PC_that_you_want_to_see_in_XP

# Security mode. Most people will want user level security. See
# security_level.txt for details.
   security = share

# Windows Internet Name Serving Support Section:
# WINS Support - Tells the NMBD component of Samba to enable it's WINS Server
   wins support = yes  # if you already have a wins server, comment out this 


[software]  # this is the name of the share. on the XP PC, this will be the 
name showing as  the shared folder
   comment = Software Collection
   path = /path_of_the_folder
   public = yes
   read only = yes
   guest ok = yes
   browseable = yes

read only = yes 
makes the folder read only. If you need to allow the XP machine to write in to 
this folder you have add the following lines as well. (delete/comment out the 
read only = yes)
 writable = yes
 create mask = 777 # allows files to be created by anyone
 directory create mask = 777 # allows sub directories to be created by anyone.

then restart Samba and your shared folder will be accessible by the XP box.

If you want to access windows shares from your Debian box, you must have smbfs 
(an all related files) installed.

Then you can use the command line or GUI tools (like smb4k in KDE) to search 
and mount windows shares.

Random Quotes From Megas XLR:
Coop: You see? The mysteries of the Universe are revealed when you break 
Jamie: When in doubt, blow up a planet.
Kiva: It's an 80 foot robot, if we can't see it, absolutely it's not here.
Glorft Technician: Unnecessary use of force in capturing the Earthers has been 

Reply to: