PDA

View Full Version : HOWTO: Setup Samba peer-to-peer with Windows



Pages : 1 [2] 3 4 5

Lowfront
January 10th, 2007, 10:41 AM
Alright i'm able to connect to ubuntu from windows. But all the folders in my media folder are locked.

When I go to add a file from windows it says, access is denied. Make sure the disk is not full protected and that the file is not currently in use.


So how to I unlock these folders and files?

TheOtherLinuxFreak
January 10th, 2007, 08:39 PM
-> [MyFiles]

This is the name of the share. Leave it as it is or adjust it to whatever you prefer. Don't use more than 31 characters and try to avoid spaces!

-> path = /media/samba/

This suggests that you've mounted an hard drive or partition on /media/samba where all the shared files will be stored.

In case you don't have an extra hard drive/partition you may also create folder.

I assume you've been wise enough to put /home onto a separate partition having an reasonable amount of storage space.

To create the folder type (inside a new terminal) ...

Code:


sudo mkdir /home/samba

... and adjust "path =" to read ...

path = /home/samba/

Remember that this is just an example - you are free to put things wherever you like.

-> force user = YOUR_USERNAME
-> force group = YOUR_USERNAME

Well, this should say it all. Replace "YOUR_USERNAME" with the name you use for login (no spaces!).

Example:

force user = stormbringer
force group = stormbringer

Now we completed the part of editing smb.conf

Save the file and close gedit.

Since we are going to share the folder with other users we should now make sure that the permissions are set. Type:

Code:


sudo chmod 0777 /media/samba

NOTE: Don't forget to correct the path to the location you chose above!

That's it - now we need to start samba ...

this is how u create a file in ur home directory. if u cant get it unlocked. it did this and it worked for me.

baldmosher
January 12th, 2007, 06:15 PM
The "force group" parameter inside the definition of the share DOES NOT, i repeat: DOES NOT, refer to a Windows-Workgroup but to the group of the local useraccount(s) on your Linux box.

Thankfully I only needed to get to page 3 to get this working - thanks for the help!

rahelvey
January 15th, 2007, 02:56 AM
thankyou sir stormbringer
I have had the unpleasant task of reinstalling my wifes windoze xp a number of differant times with the same 2 day trial of it up to speed.
Networking has always had me on the line for it works the same twice.
Your howto is now bookmarked for it worked perfect and quick.
Again thank you

mikemaggio
January 15th, 2007, 06:21 PM
I have installed Samba following the instructions but no matter how I try I cannot connect my windows 2000 server or my ubuntu workstation to the domain. Here is the error Windows 2000 gives me.

---------------------------
Network Identification
---------------------------
The following error occurred validating the name "educateint.com".
This condition may be caused by a DNS lookup problem. For information about troubleshooting common DNS lookup problems, please see the following Microsoft Web site:
http://go.microsoft.com/fwlink/?LinkId=5171

The specified domain either does not exist or could not be contacted.
---------------------------
OK
---------------------------
Don't know how to proceed.

happyhacker
January 19th, 2007, 07:05 PM
I have another PC connected to XP which does not use WINS.

Could I use WINS in this situation? I assume no because it is not configured on XP.

My login in windows is admin pws=xxxxx; If I try to use a SAMBA login on UBUNTU with 'admin' I get a response 'useradd: group admin exists - if you want to add this user to that group, use -g' Is this a clash?

pharmd24
February 3rd, 2007, 08:05 PM
Very good how to! thanks it filled in the couple of holes I still had in my network!

techno-mole
February 5th, 2007, 11:37 PM
how do i find out what the ip adress of my linux system is ?
or do i sue the routers ip address ?
cheers

Lista
February 6th, 2007, 11:20 PM
Techno-mole, 'ifconfig' typed into the terminal will do the trick.

As for me, I'm having a different kind of issue. I've managed (party) to set Sabma up, and I'm able to access my Ubuntu desktop from XP, but not the other way around. Useful clue could be that I can't even see a workgroup name when viewing Network servers.

Experts, any ideas?

sabredog
February 7th, 2007, 02:04 AM
I asked this question earlier but no one seemed to be able to help, so I will ask again here.

Can I connect to both a domain and a workgroup using Samba.

Currently connected to a workgroup with no issues but would like to connect to a domain within the same LAN concurrently.

cheers and thanks

troyDoogle7
February 9th, 2007, 09:35 AM
I find it ironic, that this entire page can be summarized in windows at least as.. .right click, share, press ok......

Sad to see how far linux has to go to be mainstream. and simple...

Some one will no doubt flame me and argue how simple it is... but nearly 10 pages of printouts !== simple

monomaniacpat
February 9th, 2007, 11:24 AM
I have followed the how-to to-the-letter, but I cannot get access from the PC. In fact, it doesn't even show up in the workgroup (MSHOME) initially, but when I've tried to mount the drive (as per the tutorial) it magically appears. When I double click on the Samba Server, it says "you may not have permission to use this network resource".

I have setup the username and password, and added it into the dialogue box in windows, but no give.

Here's the contents of my smb.conf:


[global]
; General server settings
netbios name = inspiron-8200
server string =
workgroup = MSHOME
announce version = 5.0
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192

passdb backend = tdbsam
security = user
null passwords = true
username map = /etc/samba/smbusers
name resolve order = hosts wins bcast

wins support = yes

printing = CUPS
printcap name = CUPS

syslog = 1
syslog only = yes

; NOTE: If you need access to the user home directories uncomment the
; lines below and adjust the settings to your hearts content.
;[homes]
;valid users = %S
;create mode = 0600
;directory mode = 0755
;browseable = no
;read only = no
;veto files = /*.{*}/.*/mail/bin/

; NOTE: Only needed if you run samba as a primary domain controller.
; Not needed as this config doesn't cover that matter.
;[netlogon]
;path = /var/lib/samba/netlogon
;admin users = Administrator
;valid users = %U
;read only = no

; NOTE: Again - only needed if you're running a primary domain controller.
;[Profiles]
;path = /var/lib/samba/profiles
;valid users = %U
;create mode = 0600
;directory mode = 0700
;writeable = yes
;browseable = no

; NOTE: Inside this place you may build a printer driver repository for
; Windows - I'll cover this topic in another HOWTO.
[print$]
path = /var/lib/samba/printers
browseable = yes
guest ok = yes
read only = yes
write list = root
create mask = 0664
directory mask = 0775

[printers]
path = /tmp
printable = yes
guest ok = yes
browseable = no

; Uncomment if you need to share your CD-/DVD-ROM Drive
;[DVD-ROM Drive]
;path = /media/cdrom
;browseable = yes
;read only = yes
;guest ok = yes

[MyFiles]
path = /home/patrick/downloads
browseable = yes
read only = no
guest ok = no
create mask = 0644
directory mask = 0755
force user = patrick
force group = patrick

Thanks for any help you can give!

alabamaXslim
February 10th, 2007, 05:04 PM
NOOB ALERT. (Sound of claxon ringing)

Great Tutorial. I went from nothing to a Ubuntu 6.10 Server with Samba enabled shares in just 2 days. I followed the HOWTO to the letter and it all worked as advertised.

Now the next step for me is to share a tape drive. The ultimate goal being to use my Windows Backup software to backup the Windows Boxes to the shared tape device.

Here are my particulars:


cat /proc/scsi/scsi shows
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
Vendor: DELL Model: Alpha Server Rev: V1.0
Type: Direct-Access ANSI SCSI revision: 02
Host: scsi1 Channel: 00 Id: 06 Lun: 00
Vendor: HP Model: Ultrium 1-SCSI Rev: E21V
Type: Sequential-Access ANSI SCSI revision: 03


ls -l /dev shows
crw-rw---- 1 root tape 9, 0 2007-02-09 22:47 st0
crw-rw---- 1 root tape 9, 96 2007-02-09 22:47 st0a
crw-rw---- 1 root tape 9, 32 2007-02-09 22:47 st0l
crw-rw---- 1 root tape 9, 64 2007-02-09 22:47 st0m


ls -l /media shows
total 8
lrwxrwxrwx 1 root root 6 2007-02-09 14:56 cdrom -> cdrom0
drwxr-xr-x 2 root root 4096 2007-02-09 14:56 cdrom0
lrwxrwxrwx 1 root root 7 2007-02-09 14:56 floppy -> floppy0
drwxr-xr-x 2 root root 4096 2007-02-09 14:56 floppy0


cat /etc/samba/smb.conf shows
[global]
; General server settings
netbios name = ALPHA
server string =
workgroup = CJKNET
announce version = 5.0
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192

passdb backend = tdbsam
security = user
null passwords = true
username map = /etc/samba/smbusers
name resolve order = hosts wins bcast

domain master = yes
wins support = yes

printing = CUPS
printcap name = CUPS

syslog = 1
syslog only = yes

; NOTE: If you need access to the user home directories uncomment the
; lines below and adjust the settings to your hearts content.
;[homes]
;valid users = %S
;create mode = 0600
;directory mode = 0755
;browseable = no
;read only = no
;veto files = /*.{*}/.*/mail/bin/

; NOTE: Only needed if you run samba as a primary domain controller.
; Not needed as this config doesn't cover that matter.
;[netlogon]
;path = /var/lib/samba/netlogon
;admin users = Administrator
;valid users = %U
;read only = no

; NOTE: Again - only needed if you're running a primary domain controller.
;[Profiles]
;path = /var/lib/samba/profiles
;valid users = %U
;create mode = 0600
;directory mode = 0700
;writeable = yes
;browseable = no

; NOTE: Inside this place you may build a printer driver repository for
; Windows - I'll cover this topic in another HOWTO.
[print$]
path = /var/lib/samba/printers
browseable = yes
guest ok = no
read only = yes
write list = root
create mask = 0664
directory mask = 0775

[printers]
path = /tmp
printable = yes
guest ok = no
browseable = yes

; Uncomment if you need to share your CD-/DVD-ROM Drive
[CD-ROM Drive]
path = /media/cdrom
browseable = yes
read only = yes
guest ok = no

[MyFiles]
path = /usr/local
browseable = yes
read only = no
guest ok = no
create mask = 0644
directory mask = 0755
force user = derekw
force group = derekw


cat /etc/fstab shows
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sda1
UUID=3a4df524-78da-44c1-ae92-a32e2618d990 / ext3 defaults,errors=remount-ro 0 1
# /dev/sda5
UUID=52ae24f4-e463-47ea-af34-b18abb039439 /home ext3 defaults 0 2
# /dev/sda10
UUID=a670103e-a5e6-47a5-8193-c038465ccc65 /opt ext3 defaults 0 2
# /dev/sda8
UUID=25ec553b-b6cd-493b-8cdd-638af2e4ffca /tmp ext3 defaults 0 2
# /dev/sda6
UUID=a3a3f604-fd3e-4c67-9228-c36916fcfc97 /usr ext3 defaults 0 2
# /dev/sda11
UUID=bea65b31-699d-4e86-9714-a2947434656d /usr/local ext3 defaults 0 2
# /dev/sda7
UUID=ba658367-1c67-4305-b17e-00483d585a77 /var ext3 defaults 0 2
# /dev/sda9
UUID=66710c69-7006-478e-8995-cc7366ed9f7a none swap sw 0 0
/dev/hda /media/cdrom0 udf,iso9660 user,noauto 0 0
/dev/ /media/floppy0 auto rw,user,noauto 0 0


sudo mt-st -f /dev/st0 status shows
SCSI 2 tape drive:
File number=-1, block number=-1, partition=0.
Tape block size 0 bytes. Density code 0x0 (default).
Soft error count since last status=0
General status bits on (50000):
DR_OPEN IM_REP_EN


cat /etc/stinit.def shows
# This file contains example definitions for different kinds of tape
# devices.
#
# You can find some examples in /usr/share/doc/mt-st/examples.
#
# Common definitions to be applied to all tape devices
# (This is the driver's default)
{buffer-writes read-ahead async-writes}

I can't think of any info you might need. I really appreciate any help someone can give.

No hurry but I would like to get it done in the next 5 minutes. (lol)

Again, great HOWTO. Couldn't have done it with out you and learned a few things in the process.

alabamaXslim

adam0509
February 10th, 2007, 07:08 PM
I personally use LinNeighborhood who works perfectly (universe or multiverse). It's like a Grafical Gui for samba....



<code>$ sudo apt-get install linneighborhood smbfs samba</code>

you need to do this to make it works :

<code>$ sudo chmod u+x /usr/bin/smbmnt</code>
<code>$ sudo chmod u+s /usr/bin/smbmnt</code>
<code>$ sudo chmod u+x /usr/bin/smbumount</code>
<code>$ sudo chmod u+s /usr/bin/smbumount</code>

lukem
February 10th, 2007, 09:29 PM
Thank you very much Stormbringer. I only read the first 2 pages of the thread but I'm up and sharing and sharing the printer as well. Excellent Job.

Thanks
Luke

fcerullo
February 11th, 2007, 10:36 AM
Hey Man!

Your guide worked like a charm! Thanks a mil.. I was struggling with SMB for a couple of days...

Fabio

spartan777
February 11th, 2007, 10:55 AM
excellent how-to. the only thing is that I'd like for everyone to read my files, it seems that I have to allow people on a person-by-person basis by adding each username and password. can I just allow everyone to bypass this and read my files?

xpan
February 11th, 2007, 07:50 PM
Hi,

My simple home network was working fine before the latest update of samba. Even network printing was working.

Please help. Here is my samba configuration. Neither can I see my windows shares, nor the windows user can see mine (it was working before). It is as if my two computers (ubuntu and MSXP) see different "home" workgroups...



#
# Sample configuration file for the Samba suite for Debian GNU/Linux.
#
#
# This is the main Samba configuration file. You should read the
# smb.conf(5) manual page in order to understand the options listed
# here. Samba has a huge number of configurable options most of which
# are not shown in this example
#
# Any line which starts with a ; (semi-colon) or a # (hash)
# is a comment and is ignored. In this example we will use a #
# for commentary and a ; for parts of the config file that you
# may wish to enable
#
# NOTE: Whenever you modify this file you should run the command
# "testparm" to check that you have not made any basic syntactic
# errors.
#

#======================= Global Settings =======================

[global]

## Browsing/Identification ###

# Change this to the workgroup/NT-domain name your Samba server will part of
netbios name = xpan-laptop
workgroup = Home
hosts allow = 127.192.168.1.65
browsable = yes

# server string is the equivalent of the NT Description field
server string = %h server (Samba, Ubuntu)

# Windows Internet Name Serving Support Section:
# WINS Support - Tells the NMBD component of Samba to enable its WINS Server
; wins support = no

# WINS Server - Tells the NMBD components of Samba to be a WINS Client
# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
; wins server = w.x.y.z

# This will prevent nmbd to search for NetBIOS names through DNS.
dns proxy = no

# What naming service and in what order should we use to resolve host names
# to IP addresses
; name resolve order = lmhosts host wins bcast

#### Networking ####

# The specific set of interfaces / networks to bind to
# This can be either the interface name or an IP address/netmask;
# interface names are normally preferred
; interfaces = 127.0.0.0/8 eth0

# Only bind to the named interfaces and/or networks; you must use the
# 'interfaces' option above to use this.
# It is recommended that you enable this feature if your Samba machine is
# not protected by a firewall or is a firewall itself. However, this
# option cannot handle dynamic or non-broadcast interfaces correctly.
; bind interfaces only = true



#### Debugging/Accounting ####

# This tells Samba to use a separate log file for each machine
# that connects
log file = /var/log/samba/log.%m

# Put a capping on the size of the log files (in Kb).
max log size = 1000

# If you want Samba to only log through syslog then set the following
# parameter to 'yes'.
; syslog only = no

# We want Samba to log a minimum amount of information to syslog. Everything
# should go to /var/log/samba/log.{smbd,nmbd} instead. If you want to log
# through syslog you should set the following parameter to something higher.
syslog = 0

# Do something sensible when Samba crashes: mail the admin a backtrace
panic action = /usr/share/samba/panic-action %d


####### Authentication #######

# "security = user" is always a good idea. This will require a Unix account
# in this server for every user accessing the server. See
# /usr/share/doc/samba-doc/htmldocs/Samba-HOWTO-Collection/ServerType.html
# in the samba-doc package for details.
; security = user

security = share

# You may wish to use password encryption. See the section on
# 'encrypt passwords' in the smb.conf(5) manpage before enabling.
encrypt passwords = true

# If you are using encrypted passwords, Samba will need to know what
# password database type you are using.
passdb backend = tdbsam

obey pam restrictions = yes

; guest account = nobody
; invalid users = root

# This boolean parameter controls whether Samba attempts to sync the Unix
# password with the SMB password when the encrypted SMB password in the
# passdb is changed.
; unix password sync = no

# For Unix password sync to work on a Debian GNU/Linux system, the following
# parameters must be set (thanks to Ian Kahan <<kahan@informatik.tu-muenchen.de> for
# sending the correct chat script for the passwd program in Debian Sarge).
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n *password\supdated\ssuccessfully* .

# This boolean controls whether PAM will be used for password changes
# when requested by an SMB client instead of the program listed in
# 'passwd program'. The default is 'no'.
; pam password change = no

########## Domains ###########

# Is this machine able to authenticate users. Both PDC and BDC
# must have this setting enabled. If you are the BDC you must
# change the 'domain master' setting to no
#
; domain logons = yes
#
# The following setting only takes effect if 'domain logons' is set
# It specifies the location of the user's profile directory
# from the client point of view)
# The following required a [profiles] share to be setup on the
# samba server (see below)
; logon path = \\%N\profiles\%U
# Another common choice is storing the profile in the user's home directory
; logon path = \\%N\%U\profile

# The following setting only takes effect if 'domain logons' is set
# It specifies the location of a user's home directory (from the client
# point of view)
; logon drive = H:
; logon home = \\%N\%U

# The following setting only takes effect if 'domain logons' is set
# It specifies the script to run during logon. The script must be stored
# in the [netlogon] share
# NOTE: Must be store in 'DOS' file format convention
; logon script = logon.cmd

# This allows Unix users to be created on the domain controller via the SAMR
# RPC pipe. The example command creates a user account with a disabled Unix
# password; please adapt to your needs
; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u

########## Printing ##########

# If you want to automatically load your printer list rather
# than setting them up individually then you'll need this
; load printers = yes

# lpr(ng) printing. You may wish to override the location of the
# printcap file
; printing = bsd
; printcap name = /etc/printcap

# CUPS printing. See also the cupsaddsmb(8) manpage in the
# cupsys-client package.
printing = cups
printcap name = cups

# When using [print$], root is implicitly a 'printer admin', but you can
# also give this right to other users to add drivers and set printer
# properties
; printer admin = @lpadmin


############ Misc ############

# Using the following line enables you to customise your configuration
# on a per machine basis. The %m gets replaced with the netbios name
# of the machine that is connecting
; include = /home/samba/etc/smb.conf.%m

# Most people will find that this option gives better performance.
# See smb.conf(5) and /usr/share/doc/samba-doc/htmldocs/speed.html
# for details
# You may want to add the following on a Linux system:
# SO_RCVBUF=8192 SO_SNDBUF=8192
socket options = TCP_NODELAY

# The following parameter is useful only if you have the linpopup package
# installed. The samba maintainer and the linpopup maintainer are
# working to ease installation and configuration of linpopup and samba.
; message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' &

# Domain Master specifies Samba to be the Domain Master Browser. If this
# machine will be configured as a BDC (a secondary logon server), you
# must set this to 'no'; otherwise, the default behavior is recommended.
; domain master = auto

# Some defaults for winbind (make sure you're not using the ranges
# for something else.)
; idmap uid = 10000-20000
; idmap gid = 10000-20000
; template shell = /bin/bash

#======================= Share Definitions =======================

# Un-comment the following (and tweak the other settings below to suit)
# to enable the default home directory shares. This will share each
# user's home directory as \\server\username
;[homes]
; comment = Home Directories
; browseable = no

# By default, \\server\username shares can be connected to by anyone
# with access to the samba server. Un-comment the following parameter
# to make sure that only "username" can connect to \\server\username
; valid users = %S

# By default, the home directories are exported read-only. Change next
# parameter to 'yes' if you want to be able to write to them.
; writable = no

# File creation mask is set to 0600 for security reasons. If you want to
# create files with group=rw permissions, set next parameter to 0664.
; create mask = 0600

# Directory creation mask is set to 0700 for security reasons. If you want to
# create dirs. with group=rw permissions, set next parameter to 0775.
; directory mask = 0700

# Un-comment the following and create the netlogon directory for Domain Logons
# (you need to configure Samba to act as a domain controller too.)
;[netlogon]
; comment = Network Logon Service
; path = /home/samba/netlogon
; guest ok = yes
; writable = no
; share modes = no

# Un-comment the following and create the profiles directory to store
# users profiles (see the "logon path" option above)
# (you need to configure Samba to act as a domain controller too.)
# The path below should be writable by all users so that their
# profile directory may be created the first time they log on
;[profiles]
; comment = Users profiles
; path = /home/samba/profiles
; guest ok = no
; browseable = no
; create mask = 0600
; directory mask = 0700

wins support = no
[printers]
comment = All Printers
browseable = yes
guest ok = yes
path = /tmp
printable = yes
public = yes
writable = no
create mode = 0700

# Windows clients look for this share name as a source of downloadable
# printer drivers
[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
browseable = yes
read only = yes
guest ok = no
# Uncomment to allow remote administration of Windows print drivers.
# Replace 'ntadmin' with the name of the group your admin users are
# members of.
; write list = root, @ntadmin

# A sample share for sharing your CD-ROM with others.
;[cdrom]
; comment = Samba server's CD-ROM
; writable = no
; locking = no
; path = /cdrom
; public = yes

# The next two parameters show how to auto-mount a CD-ROM when the
# cdrom share is accesed. For this to work /etc/fstab must contain
# an entry like this:
#
# /dev/scd0 /cdrom iso9660 defaults,noauto,ro,user 0 0
#
# The CD-ROM gets unmounted automatically after the connection to the
#
# If you don't want to use auto-mounting/unmounting make sure the CD
# is mounted on /cdrom
#
; preexec = /bin/mount /cdrom
; postexec = /bin/umount /cdrom


[public]
path = /home/xpan/public
available = yes
browsable = yes
public = yes
writable = yes
guest ok = yes
invalid users =
read only = no



[downloads]
path = /home/xpan/downloads
available = yes
browsable = yes
public = yes
writable = no

serlex
February 11th, 2007, 07:57 PM
samba really needs work, sometimes works sometimes does not!

xpan
February 11th, 2007, 08:44 PM
ok, I installed gsambad and tried to work with the GUI.

It seems that now I can browse through the shared printers and folders but I cannot see their contents. Even in the public folder. I also cannot print (windows says that it is not allowed)

This is my new samba configuration:



[global]
netbios name = xpan-laptop
server string =
workgroup = home
hosts allow = 127. 192.168.1.
printcap name = /etc/printcap
load printers = yes
printing = cups
cups options = raw
log file = /var/log/samba/samba.log
max log size = 1000
security = share
username level = 8
password level = 8
username map = /etc/samba/smbusers
add user script = /usr/sbin/useradd -d /dev/null -g sambamachines -c 'Samba Machine Account' -s /dev/null -M %u
smb passwd file = /etc/samba/smbpasswd
encrypt passwords = yes
unix password sync = no
passwd program = /usr/bin/passwd '%u'
passwd chat = *New*UNIX*password* %n\n *ReType*new*UNIX*password* %n\n *passwd:*all*authentication*tokens*updated*success fully*\n
null passwords = yes
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
interfaces = 127.0.0.1/8 192.168.1.0/24
remote browse sync = 192.168.1.1
remote announce = 192.168.1.1
local master = no
os level = 33
domain master = no
preferred master = no
time server = no
domain logons = no
logon drive = m:
logon home = \\%L\homes\%u
logon path = \\%L\profiles\%u
logon script = %G.bat
name resolve order = wins lmhosts bcast
wins support = no
wins server =
wins proxy = no
dns proxy = no
preserve case = no
winbind use default domain = yes
idmap uid = 16777216-33554431
idmap gid = 16777216-33554431
template shell = /dev/null

[homes]
comment = Home Directories
path = /home
read only = no
available = yes
browseable = yes
writable = yes
guest ok = no
public = no
printable = no
share modes = no
locking = no

[printers]
comment = All Printers
path = /var/spool/samba
browseable = yes
writable = no
guest ok = no
public = no
printable = yes
share modes = no
locking = no

[pdf-documents]
path = /home/pdf-documents
comment = Converted PDF Documents
available = yes
browseable = yes
writeable = yes
guest ok = yes

[pdf-printer]
path = /tmp
comment = PDF Printer Service
printable = yes
guest ok = yes
use client driver = yes
printing = bsd
print command = /usr/bin/gsambadpdf %s %u
lpq command =
lprm command =

[public]
path = /home/public
comment = Public Folder
read only = no
available = yes
browseable = yes
writable = yes
guest ok = yes
public = yes


I know I am really getting close. Any tips would be appreciated.

lamalex
February 13th, 2007, 05:45 AM
I can get to windows from ubuntu no problem, but not the other way around, my username and password don't work and I can't figure out why. I've tried a couple different users none of them work. Any ideas?

xpan
February 13th, 2007, 07:31 AM
please attach your /etc/samba/smb.conf file

Word
February 14th, 2007, 01:09 AM
I followed the howto but I still can not access the file from a windows machine it ask for a password. I made a smb user account. Here is my smb file

[global]
; General server settings
netbios name = Magrathea
server string =
workgroup = pattonhome
announce version = 5.0
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192
interfaces = lo, eth0
bind interfaces only = true

passdb backend = tdbsam
security = user
null passwords = true
username map = /etc/samba/smbusers
name resolve order = hosts wins bcast

wins support = yes

printing = CUPS
printcap name = CUPS

syslog = 1
syslog only = yes

; NOTE: If you need access to the user home directories uncomment the
; lines below and adjust the settings to your hearts content.
;[homes]
;valid users = %S
;create mode = 0600
;directory mode = 0755
;browseable = no
;read only = no
;veto files = /*.{*}/.*/mail/bin/

; NOTE: Only needed if you run samba as a primary domain controller.
; Not needed as this config doesn't cover that matter.
;[netlogon]
;path = /var/lib/samba/netlogon
;admin users = Administrator
;valid users = %U
;read only = no

; NOTE: Again - only needed if you're running a primary domain controller.
;[Profiles]
;path = /var/lib/samba/profiles
;valid users = %U
;create mode = 0600
;directory mode = 0700
;writeable = yes
;browseable = no

; NOTE: Inside this place you may build a printer driver repository for
; Windows - I'll cover this topic in another HOWTO.
[print$]
path = /var/lib/samba/printers
browseable = yes
guest ok = yes
read only = yes
write list = root
create mask = 0664
directory mask = 0775

[printers]
path = /tmp
printable = yes
guest ok = yes
browseable = no

; Uncomment if you need to share your CD-/DVD-ROM Drive
;[DVD-ROM Drive]
;path = /media/cdrom
;browseable = yes
;read only = yes
;guest ok = yes

[Magrathea]
path = /storage
browseable = yes
read only = no
guest ok = yes
create mask = 0777
directory mask = 0777
force user = kweli
force group = pattonhome
**************************************
Domain=[PATTONHOME] OS=[Unix] Server=[Samba 3.0.22]

Sharename Type Comment
--------- ---- -------
ADMIN$ IPC IPC Service ()
IPC$ IPC IPC Service ()
Magrathea Disk
print$ Disk
Domain=[PATTONHOME] OS=[Unix] Server=[Samba 3.0.22]

Server Comment
--------- -------
KWELIVIAO
MAGRATHEA
USER

Workgroup Master
--------- -------
PATTONHOME MAGRATHEA

**********************************************
Whats wrong?

xpan
February 14th, 2007, 10:11 AM
why don't you try security = share.

It is not so safe, but it is fine for a small home network.

Word
February 15th, 2007, 08:27 AM
that does not work either

TomFumb
February 16th, 2007, 12:59 AM
wow thanks, really good howto - I was dreading having to do this one day as I'm pretty new to Linux. You've really helped me out - great work

Obor
February 16th, 2007, 06:13 PM
Thanks for the guide. I went through the ubuntu part but I'm stuck on the windows part. I'm running Windows 2000 through Vmware and I can't find anything that will be equal to "map network drive" in XP. :confused:

Anyone with Windows 2000 that wants to point me in the right direction?

marcud
February 18th, 2007, 07:10 AM
hi and thankyou
i am no good with computers but i have now managed to set up half my network, my windows computer can see my ubuntu but ubuntu cannot see windows.

Now i am not an expert so i may have for gotten to look somewhere or do something could you help?

thanks

marcud
February 18th, 2007, 07:18 AM
hi and thanks
i am a non computer expert and i have set up my network but my ubuntu will not see my windows can you help or have i missed something?

Thanks
you may of got a similar quote recently i think i posted two opps!

xpan
February 18th, 2007, 10:21 AM
hi and thanks
i am a non computer expert and i have set up my network but my ubuntu will not see my windows can you help or have i missed something?

Thanks
you may of got a similar quote recently i think i posted two opps!

have you "shared" a folder in windows?

Are you sure that windows and linux "see" the same workgroup?

Robin T Cox
February 18th, 2007, 06:06 PM
Thanks for the guide. I went through the ubuntu part but I'm stuck on the windows part. I'm running Windows 2000 through Vmware and I can't find anything that will be equal to "map network drive" in XP. :confused:

Anyone with Windows 2000 that wants to point me in the right direction?

Just right-click the Windows 2000 desktop icon labelled 'My Network Places', and 'Map Network Drive' is the fifth item in the menu that appears.

lolwhites
February 24th, 2007, 01:55 PM
I went throught the guide and got stuck on the Windows part. Which IP should I set on the Windows network connection? Went to System=>Administration=>Networking and checked the properties of eth1 and eth0 but it says configuartion is automatic. The "Hosts" tab in the same window give a variety of IP addresses but the only ones that look right (127.0.0.1 and 127.0.1.1) don't seem to work when I type then into the right spot on the Windows PC.

Edit - I tried typing ifconfig into terminal and got another inet address for eth1 but using that doesn't work either.

rggavubt
February 26th, 2007, 07:40 PM
When I do your last step before you start Samba, I get this :

chmod: cannot access `/media/samba': No such file or directory

What did I do wrong??

rggavubt
February 26th, 2007, 11:34 PM
When I do your last step before you start Samba, I get this :

chmod: cannot access `/media/samba': No such file or directory

What did I do wrong??

Cancel this question. I had changed directory to /home/samba and didn't put in the request with that new path....I got it work when I updated the path in the command.

els
February 28th, 2007, 09:02 AM
Thanks!

jingo811
March 3rd, 2007, 12:43 AM
sudo useradd -s /bin/true mark
sudo smbpasswd -L -a mark
sudo smbpasswd -L -e mark
When you do this ADD USER part, how can I manage the users that has been added?
What file controls this?
For instance a Win XP user that I have added how do I know what permission they belong to:
OWNER, GROUP or OTHERS?
How can I make the Win XP switch from one permission category to another?

blenderfish
March 12th, 2007, 06:20 AM
Thank you for the how-to. So my questions is what if I have multiple drives mounted that I want to share? I have one drive, .media.hda3 that I have shared successfully, but I also want to share /media/hdb1. How do I go about adding this into the .config that is in the how-to?

zapcojake
March 14th, 2007, 12:01 AM
Hello, I followed this howto and it worked great. The only problem I am having is that the harddrive on the Ubuntu server box runs constantly. What is causing this and how do I fix this?

kptracey
March 20th, 2007, 09:15 AM
Stormbringer,

Please add 'turn off your firewall' to your tutorial. I've spent days trying to get Samba up all the while forgetting about setting up firestarter during first install.

As soon as I turned off my firewall everything worked without a hitch.

EDIT: I should add that I restarted my firewall and gave my laptop access.

Cheers,

Kieran

bpsg119
March 24th, 2007, 06:48 PM
Strombringer thank you for the howto-- its helped immensely.

I did run into an issue which I am circumnavigating currently with what I believe is a less than ideal solution.

I installed ubuntu on an old computer to use as a dedicated filesever. I have several windows XP boxes that will need to be able to access(read and write) storage drives in the computer(only have one at the moment).

Stupidly, all my windows machines use a main account, and this just happens to be my full name, so the userid looks like: "Firstname Lastname". Passwords are the same.

Using your guide I was able to get the share created on the linux end, but Ubuntu doesn't like having user accounts with spaces in the middle. I was able to do it, but the graphical user management program complains every time I look at this account I created. This works, but I'm under the impression that the /etc/samba/smbusers file offers a better solution to deal with accounts with spaces than having user accounts with spaces in ubuntu.

I followed the instructions in the first post but can't get it working unless I have a user account in ubuntu with userid- "Firstname Lastname".
Here is what I have tried:
created a user on the ubuntu system that's a single word, for example 'foo'
sudo useradd -s /bin/true foo
sudo smbpasswd -L -a foo
sudo smbpasswd -L -e foo

In the /etc/samba/smbusers file I entered
foo = "Firstname Lastname"

the password for foo is the same as the password for accounts "Firstname Lastname" on my XP machines.
---restart the samba server

In XP, when I go to connect/map the share, I am promted for a password. I've entered everything I can think of; entering-- Firstname Lastname and associated password and foo with password both fail. What does work is entering the userid/password for the administrator account I use in ubuntu.

My smb.conf file looks like that in the first post of the thread with changes made to reflect the name of the share, server, workgroup, etc.

Any idea why this doesn't work? For the time being it appears to be working with a user "Firstname Lastname" created on the ubuntu system with password, but it just doesn't seem right to have the space in there for this.

I appreciate any feedback

Charlie Evatt
March 26th, 2007, 03:28 PM
Hi there, thanks for the great HowTo, I have managed to get the file-sharing working from Ubuntu desktop accessible from my Windows and Mac computers.

However there is one slight issue -

* I have 3 shared folders - one for each member of my household
* Whichever user I log into the server with (server name:renaissance), I can access ANY of the shares, which should not be the case.

My system log tells me that it cannot find smbpasswd.... Where are these files stored, and what is happening? Can you help me? Thanks

tallguyII
March 29th, 2007, 01:02 PM
Thanks for this great tutorial. I got most everything working and can see the windows shared folders but:

I can't play an mp3 file from the shared folder but I can copy it to my desktop and then play it? What do I need to be able to use files from shares without coping them?

Also how do I start Samba at each reboot?

Thanks again for a great tutorial, Rich

dvdragon
March 31st, 2007, 06:25 PM
Your guide was very helpful. Thank you!

kostkon
April 7th, 2007, 01:02 PM
Great guide!! Many thanks!! I'm going to make a file server soon and surely I'll use this lovely guide.

Veer
April 11th, 2007, 12:56 PM
Just wanted to drop a quick thanks to Stormbringer for the awesome howto.


Works great!

kapampa
April 19th, 2007, 08:31 PM
Thanks!! An excelent work!!

nickpaton
April 21st, 2007, 12:06 PM
Works great in Feisty

Many thanks!

nickpaton
April 21st, 2007, 12:52 PM
Stormbringer,

Please add 'turn off your firewall' to your tutorial. I've spent days trying to get Samba up all the while forgetting about setting up firestarter during first install.

As soon as I turned off my firewall everything worked without a hitch.

EDIT: I should add that I restarted my firewall and gave my laptop access.

Cheers,

Kieran

Realise you posted some time ago, but it will assist others as well.

First thing to be aware of is that you need to have a static or reserved IP address for your XP PC to which you want to connect, or else you will need to reconfigure Firestarter for each session.

To do this, see my general notes below setting up Firestarter.

To use via an activated firewall.

Assume using Firestarter as GUI.

If it's not already installed, load via Synaptic.

Firestarter Wizard settings:

Detected Device(s) - select the one you are currently using - mine is wireless and is called Eth1

Skip Enable Internet sharing page

Select Start Firewall now button.

Save

System>Administration>Firestarter

Policy Tab > Editing "Inbound traffic policy"

Click inside "Allow connections from host" box. Green Add Rule symbol will appear.

Click on Add Rule > Allow connections from: and in IP, host or network host box, add the IP address of your XP PC.

Don't bother with any comments.

Click on Add, and your XP PC will now be allowed access to through the firewall.

General note on IP addresses for PC's.

It is a good idea to make sure that the same IP is assigned to each PC whether Linux or Windows when they are switched on each time.

To do this go into your modem router settings and find a page which will have a heading similar to "LAN IP Setup" (this is title for Netgear router).

Tick the box for "Use Router as DHCP Server" and assign a sufficient range of IP addresses to cover the number of PC's you have on your network.
Example:

My router IP address is 192.168.0.1

I have 4 PC's / laptops running a mixture of Linux and Windows.

The range of assigned IP addresses therefore will be:

Lowest: 192.168.0.2
Highest: 192.168.0.5

Click on Apply button

Close down the router config window (it may crash since the PC you have been using to configure it may now have a different IP address.

Reboot all PC's.

Reopen the Router settings pages and go to LAN IP setup page again.

On Netgear routers on this page, there is a section "Address Reservation" - click on Add and the new page will have each of your started PC's listed with an IP and MAC address assigned.

For each PC select the PC with a bullet and click on Add. leave the PC you are accessing the Netgear router settings until last.
When all have been added and shown in the Address Reservation list, click Apply.

The settings page will crash now for sure but when it does, simply restart all PC's, enter the Router Settings pages and confirm that each PC address is listed as being assigned.

By doing this you will always guarantee that each PC is seen as having a static IP address within the network.

Whilst you are in the router settings, you may want to add some extra security by changing the default IP address of your router. This is to prevent hackers getting into your system by trying the manufacturers default IP addresses to access your network.
This is done (for Netgear routers) once again on the LAN IP Setup page, under LAN TC/IP Setup box.
Simply change the existing address to something like 10.0.0.200 (not mine BTW!), but remember that you will have to then adjust the address reservations of each PC to start from 10.0.0.201.

Also it's a very good idea to change the default password to access the router settings and this on Netgear routers is under the Set Password page.

To assist in remembering your new default IP address and password, write them on the router base.

HTH and apologies for the length of this!

Stepes
April 26th, 2007, 08:11 PM
Sorry if it has been asked before but I searched a bit and couldn't find a solution.

I get the typical cant find destination when trying to map it in windows. I have same usernames on both pcs. I set in samba the pass of my win pc which is empty. Also I can ping the windows machine from linux :/ what is wrong?

named the laptop STEFKUBUNTU and tried to map: \\STEFKUBUNTU\MyFiles\ , \\STEFKUBUNTU\MyFiles\home\samba , \\STEFKUBUNTU\MyFiles\samba , \\STEFKUBUNTU\home\samba , \\STEFKUBUNTU\~\home\samba :P nothing worked

Thanks alot

jwjazz
May 2nd, 2007, 11:29 AM
Hi,
thanks for the tutorial. i am having some problems though. I went thru the first time and everything worked. Then something changed on my linux machine and now i can't get windows to map a network drive. i tried using wins and without. Sometimes windows can see the linux machine in the workgroup, but it says i cannot access the server. even though i have added the username and password from windows. In my modems setup page, it shows both computers and lists their ip addresses, and also the names of both machines. But neither machine can see the other one.
The only error message I get is when I login to ubuntu, it says the $Home folder's .dmrc file is being ignored, and something about it not saving the session and language information. And that the user must own the folder and so on. I made sure that the user owns the folder by looging in as root and changing the permission to the regular user. i don't know how it got changed in the first place. Anyway, this seems unrelated, but it's the only difference i can think of. Can anybody help a frustrated user?

Thanks

navlelo
May 2nd, 2007, 11:44 AM
Can anybody help a frustrated user?
I'm not an experienced Linux user and may be very wrong, but it sounds to me as if you have given wrong permissions to one or more files. You should check permissions for both samba files and /home files.

jwjazz
May 3rd, 2007, 05:38 AM
I checked the file permissions and they are correct. Not sure why i am getting that error message that the owner is not the user. I have managed to setup a network with one limitation. Ubuntu cannot see the windows xp machine, but from the xp side everything is good. Any ideas on what's wrong?

flade
May 5th, 2007, 07:55 AM
I there a way to use quota with samba. Or is this used only on system accounts ?

I want to limit folder size to users.


reg,

kenrowe410
May 6th, 2007, 02:52 AM
I checked the file permissions and they are correct. Not sure why i am getting that error message that the owner is not the user. I have managed to setup a network with one limitation. Ubuntu cannot see the windows xp machine, but from the xp side everything is good. Any ideas on what's wrong?

Same problem for me. Everything seems to be set up according to this HOWTO, but no luck seeing the XP shares on my Ubuntu machine. Anyone have any insight?

Thanks in advance,

Ken

Erlander
May 6th, 2007, 11:48 AM
I checked the file permissions and they are correct. Not sure why i am getting that error message that the owner is not the user. I have managed to setup a network with one limitation. Ubuntu cannot see the windows xp machine, but from the xp side everything is good. Any ideas on what's wrong?

Every time I've tried to setup a Samba network I've had the above situation between my Ubuntu pc and my Windows XP Home pc but not with my wife's XP Pro notebook.

I beleive it is a function of the cutdown network support in XP Home. My solution has been to dual boot the XP Home pc using Feisty. With SSH Client and Server installed on both I can browse to my hearts content provided the dual boot was booted with Ubuntu which is how it now is 95% of the time.

Rob

nrune
May 6th, 2007, 03:00 PM
Thanks for the how to, has made my life much easier!

bsm1th
May 6th, 2007, 03:56 PM
If I remember from my Microsh*t days, for a workgroup name, there is a difference between Home and home. Try making sure all computers use the same spelling, even caps. Samba may have realized this in the last update

Worth a try..

Bob <bsm1th@charter.net>

XTREEM|RAGE
May 9th, 2007, 06:36 PM
a great tutorial, that works even for noobs like me :D :lolflag:

Fraoch
May 10th, 2007, 02:15 PM
Does this setup work in Feisty?

I set it up, everything works fine, on reboot smb.conf gets rewritten with settings that break everything.

How can I tell Feisty not to screw with smb.conf?

LegoAddict
May 10th, 2007, 06:33 PM
It works in Feisty. (note: I did it up to the part where you have to fool in Windows. Then I stopped, still works)

I just came from doing it. My Ubuntu laptop was trying to join the home network that all the Windows boxes were hooked into and working fine (although there were some little quirky bits we've never been able to get rid of). I couldn't share files with either the three XP computers or the XP running under a VM in Ubuntu. Now the VM can share files with my laptop and Ubuntu can share files with all but one computer (which is the quirky one and is going to be reformatted soon anyways).


Great guide, very well explained, easy to follow even for a newbie like myself


Thanks a tonne

Fraoch
May 10th, 2007, 06:57 PM
Oh, it works fine when you set it up according to this guide, but Feisty thinks it's smarter than you are and will helpfully rewrite smb.conf on reboot, screwing up all the settings.

I'm thinking of making smb.conf read-only, but it probably makes its changes as root so that may not help.

LegoAddict
May 11th, 2007, 02:58 PM
Hmmm...


I rebooted and Samba is working better than ever (literally... my quirky computer can find it now)

Fraoch
May 11th, 2007, 03:51 PM
Has your smb.conf changed? Mine gets about 5 lines added to it which, among other things, makes the samba share read-only.

twinax
May 11th, 2007, 04:23 PM
Hi Stormbringer
I used your guide , and it is very good, thanks. I do need a little more security though, or maybe I am missing something. For our company this is going to be where we share files. But there is going to be folders that only certain people can get into.

I have created the folders and the users as per guide , but all users have access to all folders. I tried using web admin, but even if I chose ggroen as a valid user for "accounting" folder , , when I try to access it shows incorecct password or username.

Any ideas would be much appreciated.
Thanks

LegoAddict
May 11th, 2007, 06:52 PM
There was a small quirk where my shared folder (I later added my Home) "Feisty" was only browsable. Of course, I don't remember changing anything, so this is probably me just overlooking something, as everything is working fine for me.

Fraoch
May 11th, 2007, 06:59 PM
Guess I'm alone on this one. :( Thanks.

scott_rodgers100
May 15th, 2007, 10:30 PM
I think I'm trying to do something simple, but it's not working and I'm a newbie with linux so messing with all the config files listed here makes me nervous. All I'm trying to do at this point it to create several linux file servers to replace some windows 2000 servers. All they do is share a directory. What I did:

From Linux

Installed Ubutu from CD on a test machine (static IP)
Created a folder called "share" on the desktop
Shared the folder through the sharing option

From Windows XP:

Map Network Drive
\\11.11.11.11\share

XP Finds it fine but asks for an ID and password ... I put my linux user name and password in with no luck. Then started messing with user accounts / the stuff listed here etc .... then the share wouldn't work at all.

Is there a simple way to make this work? What user and password is WP looking for here and where do I set it up?

Fraoch
May 16th, 2007, 08:09 PM
I think I'm trying to do something simple, but it's not working and I'm a newbie with linux so messing with all the config files listed here makes me nervous. All I'm trying to do at this point it to create several linux file servers to replace some windows 2000 servers. All they do is share a directory. What I did:

From Linux

Installed Ubutu from CD on a test machine (static IP)
Created a folder called "share" on the desktop
Shared the folder through the sharing option

From Windows XP:

Map Network Drive
\\11.11.11.11\share

XP Finds it fine but asks for an ID and password ... I put my linux user name and password in with no luck. Then started messing with user accounts / the stuff listed here etc .... then the share wouldn't work at all.

Is there a simple way to make this work? What user and password is WP looking for here and where do I set it up?

I would start over from scratch, following the exact steps in this howto.

Fraoch
May 16th, 2007, 08:18 PM
Guess I'm alone on this one. :( Thanks.

Thankfully, once I changed it back, Ubuntu didn't change it again. Working fine now.

I even got creative, changing the share name to "SambaShare" (yes, I know, I'm so adventurous!) and adding a separate share from an already-existing folder - just copy the "MyFiles" section and change the name and path. Other PCs will now see two shares. You can map them to drives in Windows if you want.

I have two Ubuntu PCs and one Windows laptop. I had NFS working between the two Ubuntu PCs and that was FAST - files transferred at 93 Mbps, more or less saturating the 100 Mb connection. Unfortunately samba is much slower at around 45 Mbps. It's too bad, but my slower Ubuntu machine can't handle samba and NFS simultaneously (too much CPU and memory load) and since it needed samba to network with the Windows laptop I've settled on samba for networking.

scott_rodgers100
May 16th, 2007, 09:14 PM
I got this to work quite easily

Get a command box:

sudo /etc/init.d/samba stop
sudo gedit /etc/samba/smb.conf

find lines that look like these:

"security=share" "encrypt passwords=no"

Just before the line type: "; I'm changing this"
Then put a ; in front of the "security=****" line
Then type in the "security=share" line
Do the same thing for the "encrypt passwords" line

save the file

sudo /etc/init.d/samba start

Alex99
May 20th, 2007, 12:51 PM
Hi, servus,

again thanks for a very helpful howto. I can now access my ubuntu files from my vista machine. However, the other way around it doesn't work. Could you point me in the right direction please?

Ubuntu Edgy
Windows Vista
Private WLAN network
under Places > Network Servers I see the windows machine, but I can't log in. When I insert my IP-address in windows (under TCP/IP > Properties > advanced >WINS), I no longer see it.

Thankful for every hint! Alex

vladimiroane
May 21st, 2007, 11:57 AM
Everything was fine until one day it stooped working. I can not longer see my Windows shares although I don't have any problem accessing my Ubuntu box from Windows. Any idea what might have happened.

Since then I did all the steps in the tutorial once again but no luck. In nautilus under network, windows network there is nothing.

kanna1620
May 22nd, 2007, 05:10 AM
HOWTO: Setup Samba peer-to-peer with Windows


Really a nice and good How to. Thank you.

xwisdom
May 25th, 2007, 08:09 AM
Hi,

This is a very nice tutorial. Many thanks.

I just have one question:

Can Samba be configured to athenticate it's user via the ubuntu user database? In other words, I would just like to be able to user Ubuntu to create the user and then had samba validate the network user without me having to create a new samba user (using smbpasswd) that matches the new ubuntu user.

Is this possible? Any pointers, suggestions?

plech.d
May 26th, 2007, 09:04 PM
Hi, thanks a lot for pasting this tutorial, but I seem to be having a problem right at the very beginning.

I installed Ubuntu Feisty Fawn on my laptop. The first thing I did after installation was that I started the terminal and wrote "sudo apt-get install samba". This told me that samba was not available, but that another package - samba-common - replaced it. So I tried to write "sudo apt-get install samba-common", which told me that I've already got the newest version installed.

So then I went on with your tutorial and tried to stop samba by typing "sudo /etc/init.d/samba stop" but found that there was no file called "samba" in the init.d directory. Nothing called anything similar to Samba was there.

Can you help me with this? Is it possible that the Ubuntu CD I downloaded misses Samba??

Thanks very much for your reply

fredde_firebug
June 4th, 2007, 03:35 AM
I'm getting message gedit: command not found when i type sudo gedit /etc/samba/smb.conf
I have also tried kate

Shampyon
June 5th, 2007, 02:50 AM
I'm getting message gedit: command not found when i type sudo gedit /etc/samba/smb.conf
I have also tried kate

Are you on xUbuntu? If so, try sudo mousepad /etc/samba/smb.conf

dene
June 5th, 2007, 10:26 AM
Hi all,
A very new newbie, I've had 30 years experience with computers from CP/M to Win 98, and have recently converted to linux, choosing kubunto 6.0.6 LTS.

As I still have legacy PC's running WIN 9x, I want to share files. I can see and get files from the windows machines using konqueror but can't make the linux machine visible on the windows network.

when I try the "stop" or "start" commands on samba i get;

"dene@dene-laptop:~$ sudo /etc/init.d/samba start
Password:
sudo: /etc/init.d/samba: command not found
dene@dene-laptop:~$"

... what's the next step please? I don't even know how to search for the executable using "ls" or even what I should be looking for. I've checked using the adapt manager to make sure samba is installed. ... help please

Dene

Speedoo
June 6th, 2007, 05:03 AM
Hi Stormbringer,
I'm a complete linux noob trying to add my Ubuntu box to my network. I followed your instructions, and sure enough, I now have an entry in my Windows Explorer called "MyFiles on <ipaddress> (Z:). However, this drive shows up as blank. I went back to the linux machine, thinking I'd find an empty directory at /home/myfiles, but no luck. Am I supposed to be seeing my linux files on my Windows machine? Or do I need to move files I want to share to a specific place in Ubuntu? And if so, where? Also, I'm still not able to access the printer on my linux machine from my Windows laptop.
Thanks for bearing with an amateur!

Speedoo

Speedoo
June 6th, 2007, 04:04 PM
Oops, I think I answered my own question. Apparently all I had to do was SHARE to SMB the linux directory I want to share. Oddly enough, sharing a directory actually enabled network printing as well! Don't understand it, but it seems to be working. Thanks for all the time you put into helping us noobs!

Draugauth
June 8th, 2007, 05:29 PM
Hi all,
A very new newbie, I've had 30 years experience with computers from CP/M to Win 98, and have recently converted to linux, choosing kubunto 6.0.6 LTS.

As I still have legacy PC's running WIN 9x, I want to share files. I can see and get files from the windows machines using konqueror but can't make the linux machine visible on the windows network.

when I try the "stop" or "start" commands on samba i get;

"dene@dene-laptop:~$ sudo /etc/init.d/samba start
Password:
sudo: /etc/init.d/samba: command not found
dene@dene-laptop:~$"

... what's the next step please? I don't even know how to search for the executable using "ls" or even what I should be looking for. I've checked using the adapt manager to make sure samba is installed. ... help please

Dene

it is sudo /etc/init.d/samba restart
or at least that is how I restart samba after making changes.
Make sure you have Samba installed though. Other than that I am new myself and running into some problems so not sure how much help I will be.

Draugauth
June 8th, 2007, 05:36 PM
First off let me say that that was an awesome guide and wish I had found it a couple weeks back.

But now I have a new problem.

I can read the whole share but I can only write to the root directory of the share. Example

[Multimedia]
path = /media/multimedia
browseable = yes
read only = no
guest ok = no
create mask = 0644
directory mask = 0755
writable = yes
write list = user_name
valid users = user_name


Now I can write and delete files that are the "root directory" for the share but any sub-directories I am denied although I can read the files just fine.

How can I fix that?

Also due to the fact that I have friends that come over etc and need access to the shares is there a way to setup groups and make it so that only certain groups can read/write or just read?

Oh and one last thing.
My roommate and I fix windows computers all the time. As such I have 1 share that is as follows

[Backup]
path = /media/backup
browseable = yes
read only = no
guest ok = yes
create mask = 0777
directory mask = 0777
writable = yes
public = yes

However no one can seem to access it period. Any suggestions?

Again thank you for all the hardwork you have done with this stuff. It has really helped me out a lot.

I have tried reading the mans but I am one of those that can't make heads or tails out of instructional manuals but once I see a good example or am shown how to remember it like an elephant ;)

ukripper
June 9th, 2007, 11:56 AM
Nice guide mate. Keep it up with good work.

Neurasthenic
June 9th, 2007, 03:53 PM
Hi, thanks for the guide! I'm pretty new and have been wondering how to set up file sharing between my computers.

I followed the guide and can see the other computer from both of my boxes (one Ubuntu, one Vista). The main thing I'm trying to do is access my music from the Vista system on my Ubuntu computer. So I navigate to the folder (Places > Network > PCNAME > My Music). Once I'm in there, I can see a list of all my folders, but I can't actually see what's inside them - even if I go in on the Windows machine and specifically share the individual folders. I get this error in Nautilus when I try to view a folder that I've specifically shared: "The folder contents could not be displayed."
If I try to view a folder that is not specifically shared, but is inside the shared My Music folder, I get this error: "Nautilus cannot display "smb://nick-pc/My%20Music/Ayreon. Please select another viewer and try again."

Can anyone help figure out how I can get to my actual MP3's?

Edit: I download a Samba browser, and can now see my MP3's - but my new question is, why could I not see them before? What is the Nautilus browser doing differently than this new program?

arobase
June 9th, 2007, 07:58 PM
Nice guide , many thanks, worked perfectly for me on the last Ubuntu distribution

volksman
June 11th, 2007, 02:57 PM
This might sound weird but what happens if you remove any windows boxes from the network and only have samba running on linux boxes?

Does there need to be a windows box to have the master browser or whatever its called?

volksman
June 11th, 2007, 06:09 PM
I'm good...the answer to the above is yes (sorta). There has to be a master browser. So you can configure Samba to do so if you have no windows boxes left in your network.

Erlander
June 12th, 2007, 01:07 AM
This might sound weird but what happens if you remove any windows boxes from the network and only have samba running on linux boxes?

Does there need to be a windows box to have the master browser or whatever its called?

I have a dual boot (Windows & Ubuntu) pc, another Ubuntu pc and a Windows laptop on a network. When only running the 2 pc's under Ubuntu I find SSH better. I just installed SSH client and server on each. Works well.

Rob

ukripper
June 12th, 2007, 08:38 AM
SMB protocol works great even without windows boxes. I mostly use print server and two other ubuntu boxes configured with samba, works without any glitch (perfect is the word).

lamadredelsapo
June 15th, 2007, 03:51 PM
Great how to! I have been looking for this quite a long time

joeygreen
June 16th, 2007, 03:33 AM
Thank you so much for putting this together, it was beyond helpful.

shane2peru
June 21st, 2007, 07:16 PM
First of all thanks for this tutorial!!! Now I have one small problem that has probably been addressed (I'm sorry I didn't read all 18 pages of this thread). Perhaps you may want to include a little note about this issue if it has been dealt with in the past. I have Kubuntu 7.04 (Fiesty) and Windows XP box. I believe my problem is that the user name and the password is different for both computers. Is there any way to deal with this, or do I need to change settings on one or the other?
Ex.
username for XP = george
password for XP = dumbquestion
username for Ubuntu= frank
password for Ubuntu=hereitis.


Thanks.

Shane

bren
June 21st, 2007, 10:15 PM
hi shane

you are nearly there....
there is an easy way to sort this and it is described elsewhere but to repeat..... (:-))

you need to set up a samba user now you have

username for XP = george
password for XP = dumbquestion
username for Ubuntu= frank
password for Ubuntu=hereitis
username for samba = george
password for george = dumbquestion

now when you ask samba to speak to the windows box it logs in with your usual name / pass

go back to the tutorials and look for the bit where its got code like

samba add user ..........

and give the xp details to the samba user

hope that helps

bren

shane2peru
June 21st, 2007, 10:45 PM
hi shane

you are nearly there....
there is an easy way to sort this and it is described elsewhere but to repeat..... (:-))

you need to set up a samba user now you have

username for XP = george
password for XP = dumbquestion
username for Ubuntu= frank
password for Ubuntu=hereitis
username for samba = george
password for george = dumbquestion

now when you ask samba to speak to the windows box it logs in with your usual name / pass

go back to the tutorials and look for the bit where its got code like

samba add user ..........

and give the xp details to the samba user

hope that helps

bren
Bren,

Thanks for the quick response. What I did was ran that add user line twice, once for my Ubuntu username & password and once for my Windows username & password, then when I ran that other command listed somewhere in this thread and get this response:
smbclient -L localhost -U%
Domain=[RICES] OS=[Unix] Server=[Samba 3.0.24]

Sharename Type Comment
--------- ---- -------
print$ Disk
MyFiles Disk
IPC$ IPC IPC Service ()
Domain=[RICES] OS=[Unix] Server=[Samba 3.0.24]

Server Comment
--------- -------
COMPAQ Kat's Compaq
KUBUNTU

Workgroup Master
--------- -------
RICES KUBUNTU

which lists both computers. When I open konqueror and go to the remote places I can see the other computer Compaq (XP) when I click on it, I can't see anything. When I open My Network Places on the XP computer I can't even see the Ubuntu computer. I really don't understand all this. I disabled the firewall on the XP computer to see if it works and still can't see anything. Here is my config file too:

[global]
; General server settings
netbios name = Kubuntu
server string =
workgroup = RICES
announce version = 5.0
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192

passdb backend = tdbsam
security = user
null passwords = true
username map = /etc/samba/smbusers
name resolve order = hosts wins bcast

wins support = yes

printing = CUPS
printcap name = CUPS

syslog = 1
syslog only = yes

; NOTE: If you need access to the user home directories uncomment the
; lines below and adjust the settings to your hearts content.
;[homes]
;valid users = %S
;create mode = 0600
;directory mode = 0755
;browseable = no
;read only = no
;veto files = /*.{*}/.*/mail/bin/

; NOTE: Only needed if you run samba as a primary domain controller.
; Not needed as this config doesn't cover that matter.
;[netlogon]
;path = /var/lib/samba/netlogon
;admin users = Administrator
;valid users = %U
;read only = no

; NOTE: Again - only needed if you're running a primary domain controller.
;[Profiles]
;path = /var/lib/samba/profiles
;valid users = %U
;create mode = 0600
;directory mode = 0700
;writeable = yes
;browseable = no

; NOTE: Inside this place you may build a printer driver repository for
; Windows - I'll cover this topic in another HOWTO.
[print$]
path = /var/lib/samba/printers
browseable = yes
guest ok = yes
read only = yes
write list = root
create mask = 0664
directory mask = 0775

[printers]
path = /tmp
printable = yes
guest ok = yes
browseable = no

; Uncomment if you need to share your CD-/DVD-ROM Drive
;[DVD-ROM Drive]
;path = /media/cdrom
;browseable = yes
;read only = yes
;guest ok = yes

[MyFiles]
path = /home/shane/share/
browseable = yes
read only = no
guest ok = no
create mask = 0644
directory mask = 0755
force user = shane
force group = shane

Any help would be greatly appreciated. :) Thanks.

Shane

bren
June 21st, 2007, 11:28 PM
What I did was ran that add user line twice, once for my Ubuntu username & password and once for my Windows username & password

why did you do that?
you need to remove the ubuntu username one I think????

if that doesn't work then start from the beginning .....
follow strormbringers very easy to follow step-by-step tutorial
http://ubuntuforums.org/showthread.php?t=202605&highlight=stormbringer
don't do anything extra this time!

your config looks ok ....

bren

shane2peru
June 21st, 2007, 11:54 PM
why did you do that?
you need to remove the ubuntu username one I think????

if that doesn't work then start from the beginning .....
follow strormbringers very easy to follow step-by-step tutorial
http://ubuntuforums.org/showthread.php?t=202605&highlight=stormbringer
don't do anything extra this time!

your config looks ok ....

bren

Well, Um, not sure why I did that :redface: . I think I did it after things didn't work right, I figured I needed to add a few users, one for the Windows and one for the Ubuntu seeing how it wasn't covered in the how to, (with different user names and passwords). I would not have a problem removing them, but how??? :confused: The add command and enable command is there, but nothing about removing people. :) I can purge my Samba installation and then start over, would that purge the users too? I get confused when it gets to the password and users because I don't know what password and usernames to use? Ok, from now on we can refer to the Windows UAP (Username and Password) and the Ubuntu UAP, and then there is a Samba UAP? ??? Any ideas?
Thanks for the quick responses. I'm awaiting the remove command. :D

Shane

fast eddie
June 24th, 2007, 07:03 PM
OK, I have set up as per instructions and I can see the Win XP machine from my Ubuntu pc but I cannot seem to map a drive, run Putty or WINSCP from my XP machine.

Can some one please give me some suggestions as to what I am doing wrong :confused:

mahasmb
June 26th, 2007, 09:53 PM
I've got a little problem...


maha@maha-laptop://$ sudo smbpasswd -L -a your_username
New SMB password:
Retype new SMB password:
Failed to modify password entry for user your_username
maha@maha-laptop://$


*Edit: Silly, silly me. Replace 'your_username' with you know, your user name -_-;

howardf42
June 26th, 2007, 11:15 PM
Thank you StormBringer for an excellent How-to. I hope that a year later you're still tracking this thread. I went through your setup routine and after all is said and done, I'm still not connected. When I attempt to map the drive in Windows, after entering my username and password, I get a message: "The mapped network drive could not be created because the following error has occured: An unexpected network error occured."

I've tried with and without WINS enabled and get the same results. Any clues an what to look for now?

Thanks,
Howard

fast eddie
June 27th, 2007, 11:59 AM
I am getting the same message as howardf42

Aksumka
June 28th, 2007, 05:48 AM
Can someone help me out with this?

I followed this How to, or a similar one months ago and it was working great. But the computer I was running it crashed so I had to reinstall ubuntu (6.06, 7.04 caused the crash). I now can not figure out how I had it set up. I have it working, i can connect to it, but I need a user name and password that I never set. I tried every username and password combo i have ever associated with the computer.

Please help! It took me like 2 days just to get this computer up agian!

Tommy James
June 28th, 2007, 02:27 PM
Cancel the request. It was the old ID10T error. Forgot to enter the gateway address when I made the IP address static. Sorry for the post!

Thanks again for the How To ---- very helpful!


Good news/Bad News

Good news: Followed the How To and sharing between my Work XP box and Ubuntu Personal Desktop work great. No issues. The 3rd box, running xubuntu, is being used as a CUPS print server. Everything is good there, too. I can print from Ubuntu box to the xubuntu shared printer. All boxes are on the same router.

Bad news: Internet would work now!?! Any thoughts? My xubuntu and XP systems can get to the net. Its like something got turned off while I was doing my config.

Thanks everyone for the help.

Also, thanks for the How To very, very, easy to follow!

victorgreen
June 30th, 2007, 10:32 PM
Stormbringer, you're a life saver. Samba works now!!

devillion
July 2nd, 2007, 01:51 AM
After following this guide using live 7.04, my samba network is up and visible, but i can't connect to it. When i attempt to "map network drive" in windows, i cannot login, and only get "an unknown network error has occured".

How can i diagnose what is going wrong, if windows isn't telling me?

chrisbain88
July 2nd, 2007, 08:51 AM
Hi,
I have set up my samba share how this tutorial has said, and it works so i can see the share and contents that i could not before, however my problem arises as i can not copy to or from the share. using my xp computer. The copy finally comes up after sitting there for a while, and everytime the network connection disconnects and reconnects.
Does anyone have a solution.
Cheers
Chris

WebHorn
July 3rd, 2007, 05:01 AM
This guide was helpful, but I had a unique problem that took me a little while to figure out that I didn't see the answer for here. Basically I wanted share-level behavior with user-level security. I wanted any machine to be able to list the shares, and then have to authenticate if they needed more permissions to get into a more protected share (or not, if they were trying to get into a public share).

I wrote up a more in-depth thread (http://ubuntuforums.org/showthread.php?t=490168) on the settings you will need to use to achieve this behavior. Of course you could always use share-level security, but where's the fun in that?

warbread
July 6th, 2007, 02:12 AM
Ok, so I've followed the How-to very closely, but am having problems mapping the network drive in Windows.

I have the same user name and password for Windows as I have for samba, but it differs from my Linux password (user name is the same throughout) I can see the samba share in the Windows network browser, but I can't access it. The login prompt comes up, and I put my information in, but it acts as though the information is incorrect. The box blinks, and then it comes back to asking me for my info.

Anyone know what the deal could be?

kenmonk
July 6th, 2007, 04:30 PM
I've managed to get Samba working in the past, but am having problems with the current version - kubuntu. Checks (from information in the earlier massages) seem to suggest that it is a password problem as I can't change my smb password as a user.

The obvious thing to try, therefore, (or so it seemed) was to sudo to root and set it there (which I thought I had already done anyway. The same problem still exists!!

I have put below a copy of the error message I get when I try to run:
smbclient -L localhost -U%
followed by my attempts to reset the password to something definite. As you can see, it still blows up in exactly the same way!

Anyone any suggestions as to what I'm doing wrong?

__________________________________________________ ____________________
Terminal Copy
__________________________________________________ ____________________
ken@Ken-MeshLaptop:~$ smbclient -L localhost -U%
Domain=[NORTONPHOTO] OS=[Unix] Server=[Samba 3.0.24]
tree connect failed: NT_STATUS_WRONG_PASSWORD
ken@Ken-MeshLaptop:~$ smbpasswd
Old SMB password:
New SMB password:
Retype new SMB password:
machine 127.0.0.1 rejected the tconX on the IPC$ share. Error was : NT_STATUS_WRONG_PASSWORD.
Failed to change password for ken
ken@Ken-MeshLaptop:~$ smbpasswd
Old SMB password:
New SMB password:
Retype new SMB password:
machine 127.0.0.1 rejected the tconX on the IPC$ share. Error was : NT_STATUS_WRONG_PASSWORD.
Failed to change password for ken
ken@Ken-MeshLaptop:~$ man smbpasswd
Reformatting smbpasswd(8), please wait...
ken@Ken-MeshLaptop:~$ sudo smbpasswd -a ken
New SMB password:
Retype new SMB password:
ken@Ken-MeshLaptop:~$ smbpasswd
Old SMB password:
New SMB password:
Retype new SMB password:
machine 127.0.0.1 rejected the tconX on the IPC$ share. Error was : NT_STATUS_WRONG_PASSWORD.
Failed to change password for ken
ken@Ken-MeshLaptop:~$ smbclient -L localhost -U%
Domain=[NORTONPHOTO] OS=[Unix] Server=[Samba 3.0.24]
tree connect failed: NT_STATUS_WRONG_PASSWORD

warbread
July 8th, 2007, 01:18 AM
Ok, so I've followed the How-to very closely, but am having problems mapping the network drive in Windows.

I have the same user name and password for Windows as I have for samba, but it differs from my Linux password (user name is the same throughout) I can see the samba share in the Windows network browser, but I can't access it. The login prompt comes up, and I put my information in, but it acts as though the information is incorrect. The box blinks, and then it comes back to asking me for my info.

Anyone know what the deal could be?

Well, I've solved my own problem, having just come back to it. I had an entry in /etc/samba/smbusers from a previous set of instructions that was conflicting with this How-To. I deleted the entry and everything works great.

spartan778
July 10th, 2007, 11:05 PM
First off I like to say this is an excellent tutorial. Next I got everything working perfect in windows however when I try to access my windows folders in kubuntu I get an error message that says "Could not connect to server WINDOWS Connection failed: NT_STATUS_CONNECTION_REFUSED". Is there something in kubuntu I failed to do, or it a windows problem. I am using XP home.

Depressed Man
July 11th, 2007, 10:29 PM
This guide got it working for me... but one day it randomly stopped working (well the hostname part). So now I have to connect by IP address and not my hostname/MyFiles

Followed random posts thru searches, installed Winbind and still can't get my hostname working again.

delphiguy
July 12th, 2007, 08:34 AM
I followed this guide before when I first tried using Dapper + VMWare and it worked, but now I tried it on my Feisty + VMWare can't seem to make it work. All windows does is ask for a username and password, but when I provided the username and password that I have setup with samba it seems to fail and asks again.

Any ideas? maybe I may have missed something here.

thanks

dvenardos
July 15th, 2007, 09:00 AM
Wow thanks, I was missing that enable user step. Between this and the samba configuration on OS X I was able to get it working the way I wanted.

It would be nice if Ubuntu had an option for windows file sharing like Mac OS X that automatically shared the home directories and would add any new users to the samba password file. This would cover the needs of almost all the average joes out there.

With Mac OS X all the wins stuff is totally uneeded. I can connect to by smb://machinename and everything works fine.

dvenardos
July 15th, 2007, 09:02 AM
I followed this guide before when I first tried using Dapper + VMWare and it worked, but now I tried it on my Feisty + VMWare can't seem to make it work. All windows does is ask for a username and password, but when I provided the username and password that I have setup with samba it seems to fail and asks again.

Any ideas? maybe I may have missed something here.


I had problems with VmWare and samba also it appears that there is a bug in the current vmWare player when using bridged networking, more info on the vmware forums. I switched to NAT and everything worked fine.

rboothe
July 17th, 2007, 04:01 AM
I'm very new to ubuntu and have been trying for some time to have the other windows based machines "see" & browse the ubuntu machine and vice versa.

I've read the thread but got stuck where you adives to "open a terminal". How do i open a terninal ??? I started "Terminal server client" but didn't have a clue regarding what to enter in the dialog boxes (i.e what goes in "computer", "domain", "client hostname"....etc ???

Depressed Man
July 17th, 2007, 11:20 PM
If you are using gnome press alt+f2 and type this in gnome-terminal

Or click accessories > terminal from the menu bar.

musicarvind
July 25th, 2007, 07:04 AM
Hi thank u sooooooooo much for this tutorial. The main reason for running samba was to share my printer and it worked.

However my Linux box shows on my XP computer. It shows the printer. of which was ideal and works YAY!. but .. it also has a folder MyFiles. I click on it and it says that you do not have permission. Contact your administrator etc etc etc. My question is how come it does not show the folder \\ARVIND\home\samba\ of which i wrote in the config file of samba?

thanks for any help.

CowzRule
July 26th, 2007, 07:32 AM
Hi thank u sooooooooo much for this tutorial. The main reason for running samba was to share my printer and it worked.

However my Linux box shows on my XP computer. It shows the printer. of which was ideal and works YAY!. but .. it also has a folder MyFiles. I click on it and it says that you do not have permission. Contact your administrator etc etc etc. My question is how come it does not show the folder \\ARVIND\home\samba\ of which i wrote in the config file of samba?

thanks for any help.

I could be wrong, but shouldn't it be
/home/ARVIND/samba

girard
July 31st, 2007, 10:14 AM
Hi. I've been reading the whole day, so pardon if I didn't have enough drive to read through the 30+ pages in this thread.

I am able to access/copy/add files from the linux end of the network. But I am having trouble accessing linux from the XP end. I can see my FIESTY machine in the workgroups, but the folder MYFILES, I cannot access it. actually, it was there the first time, I couldn't access it, and then it disappeared.

can anyone help me out? in what part of the tutorial did I set the "shared linux folder"?

here's my smb.conf



[global]
; General server settings
netbios name = FIESTY

workgroup = MSHOME
announce version = 5.0
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192

passdb backend = tdbsam
security = user
null passwords = true
username map = /etc/samba/smbusers
name resolve order = hosts wins bcast

wins support = yes

printing = CUPS
printcap name = CUPS

syslog = 1
syslog only = yes

; NOTE: If you need access to the user home directories uncomment the
; lines below and adjust the settings to your hearts content.
;[homes]
;valid users = %S
;create mode = 0600
;directory mode = 0755
;browseable = no
;read only = no
;veto files = /*.{*}/.*/mail/bin/

; NOTE: Only needed if you run samba as a primary domain controller.
; Not needed as this config doesn't cover that matter.
;[netlogon]
;path = /var/lib/samba/netlogon
;admin users = Administrator
;valid users = %U
;read only = no

; NOTE: Again - only needed if you're running a primary domain controller.
;[Profiles]
;path = /var/lib/samba/profiles
;valid users = %U
;create mode = 0600
;directory mode = 0700
;writeable = yes
;browseable = no

; NOTE: Inside this place you may build a printer driver repository for
; Windows - I'll cover this topic in another HOWTO.
[print$]
path = /var/lib/samba/printers
browseable = yes
guest ok = yes
read only = yes
write list = root
create mask = 0664
directory mask = 0775

[printers]
path = /tmp
printable = yes
guest ok = yes
browseable = no

; Uncomment if you need to share your CD-/DVD-ROM Drive
;[DVD-ROM Drive]
;path = /media/cdrom
;browseable = yes
;read only = yes
;guest ok = yes

[MyFiles]
path = /home/samba

read only = no
guest ok = no
create mask = 0644
directory mask = 0755
force user = KUBLI
force group = KUBLI
available = no
browsable = yes
public = no
writable = no


i'll try to find a solution, but any help would be appreciated... my eyes hurt already... thanks a lot....

girard
July 31st, 2007, 12:28 PM
got it to work already!!! although i got lost in the process and i can't exactly share how i fixed it... i think it was the changes i made with my Netbios name and force user and force group. I changed everything into my login name... oh yeah... that's what it said in the tutorial right? lol. my bad. sorry.

this is so cool. thanks for this great tutorial! now i don't have to transfer files using my usb drive! haha!

microbyte
July 31st, 2007, 03:32 PM
Wow! You're instructions are great! I can't say that it has worked yet, but that isn't your fault.

I'm going to try it again, and see what happens.

I did have one quick clarification question, though. You mention actually mounting folders as HDs (or something) on the PCs. I was wondering if that is necessary, or if I can just browse it like through My Network Places in XP. Would that work?

Thanks!

Added: Okay, I went and tried it again. It still doesn't work. I can see that my linux computer exists from my other PCs, but none of them can access it. I can't see anything under the Windows Network folder on my linux PC. I don't know if this will mean anything, but I was trying to do a simple VNC connection through my network, and that doesn't want to work either.

The only things I tried different this time was to do the actual user acount name of my XP computer, and not the netoworking PC name. Other than that, there wasn't anything to change. Oh, I forgot. I did it without WINS this time, as I think it messed up the internet connection on my linux PC when I gave it a static IP address.

Any Ideas?

girard
August 2nd, 2007, 02:20 AM
Wow! You're instructions are great! I can't say that it has worked yet, but that isn't your fault.

I'm going to try it again, and see what happens.

I did have one quick clarification question, though. You mention actually mounting folders as HDs (or something) on the PCs. I was wondering if that is necessary, or if I can just browse it like through My Network Places in XP. Would that work?

Thanks!

Added: Okay, I went and tried it again. It still doesn't work. I can see that my linux computer exists from my other PCs, but none of them can access it. I can't see anything under the Windows Network folder on my linux PC. I don't know if this will mean anything, but I was trying to do a simple VNC connection through my network, and that doesn't want to work either.

The only things I tried different this time was to do the actual user acount name of my XP computer, and not the netoworking PC name. Other than that, there wasn't anything to change. Oh, I forgot. I did it without WINS this time, as I think it messed up the internet connection on my linux PC when I gave it a static IP address.

Any Ideas?

perhaps you could be experiencing the same slow loading of folders like i do... i thought at first that the network wasn't setup correctly because nothing was showing up. then i was forced to leave my desk after clicking on the share folders, when i came back it was there. that;s when i realized that i takes a really long time for the folders to load - which is different i think from a "slow network connection". that's because when they do get loaded, copying files are pretty normal.

i haven't found a solution to this problem yet, nor has anyone replied to my thread. here:

http://ubuntuforums.org/showthread.php?t=514916

does your windows show limitied or no connectivity? i'm tracing the problem to this, since it makes sense for things to slow down when you have limited connectivity.

has anyone experienced this?

befana
August 3rd, 2007, 11:25 AM
Thank you, Stormbringer!!!!
Your howto helped me.
I think it's great!

kgr132
August 4th, 2007, 01:58 PM
Awesome!
This HowTo worked like a charm. Many thanks.
-K-

gordon3913
August 5th, 2007, 05:48 AM
I followed your instructions and everything went great.
Thank you for a great tutorial.

TrashmanL
August 5th, 2007, 02:49 PM
This HOWTO post is still working. I already had Samba installed, and used the Shared Folders GUI included in Feisty Fawn. I was reading my windows shares fine, but when I tried to see my Linux files on my Windows box, it kept asking me for a password (that didn't exist). I used the settings in smb.conf in this HOWTO and now everything works fine! Thanks!

zilch0
August 6th, 2007, 12:54 AM
Excellent guide, and thank you to everyone that contributed. Saved me from a huge headache! :-({|=

somafm
August 6th, 2007, 04:46 AM
Great tutorial, worked just fine :)

harakiri1976
August 8th, 2007, 04:42 AM
Hi!

I followed this Tutorial...

http://youtube.com/watch?v=Ad17kma8rNM

..and when I go to

Places -> Network

I can't see my Windows Computer or Folder to Share.

And it's the same thing in Windows. Can somebody give me some clues what is missing? I followed every steps very careful and I can't find why I can't share anything:(

rabideau
August 9th, 2007, 04:21 PM
Excellent Help Video!:popcorn:

cooldudeny
August 10th, 2007, 07:18 AM
ok so i saw this youtube video to set up the samba and how to edit the settings and how to share the folder but now when i go back to my wireless laptop and click on shared computer it ask me for the username and password and once i m done putting in the password
it is showing me the shared folder but i m tryint to open the share folder it is giving me error

http://img518.imageshack.us/img518/3726/errorjo6.th.jpg (http://img518.imageshack.us/my.php?image=errorjo6.jpg)

please tell me if i missed any steps while setting things up

to give a overview of my network i have a pc and a laptop both running wireless router with dsl internet

please help thanks

girard
August 10th, 2007, 08:59 AM
is anyone experiencing slow access times in the linux end of the network? this seems to be my problem. access on the windows side is good, but when it comes to linux accessing windows, it takes quite some time. that is, it's only slow when you first access the windows share, but once they get accessed at least once, everything is pretty good. any ideas on this?

cooldudeny
August 10th, 2007, 09:10 PM
hey i am using a wireless router for my internet at home how can i get a static ip address ?
and if i dont have a static ip address i can not share folders on a network ?

please let me know and also i am really new at all this so might be asking question that will sound silly so please forgive my ignorance in this field

bren
August 11th, 2007, 12:49 AM
if you ISP will not give you static IP (someimes costs more) then you can use a free service from dynamicdns to do this

stalker145
August 11th, 2007, 01:42 PM
hey i am using a wireless router for my internet at home how can i get a static ip address ?
and if i dont have a static ip address i can not share folders on a network ?

please let me know and also i am really new at all this so might be asking question that will sound silly so please forgive my ignorance in this field

If you are speaking of a static IP within your network, it is as simple as either opening 'Network' under the 'Administration' menu and plugging in a static IP vice DHCP or going into your router and assigning a specific IP to the MAC that your computer has.

Attached are a pair of images showing how to get to the Network settings. Assigning IP's via your router is a little different since all routers are different - I've attached an example of my Linksys if you have one of those.

Now, if you're speaking of getting a static IP for your MODEM so that you can access your files from the outside then, as mentioned, you either need to pay your ISP more money for a static IP or go for a dynamic DNS service.

Check back if this fails to answer or you need more help.

cooldudeny
August 13th, 2007, 02:30 AM
If you are speaking of a static IP within your network, it is as simple as either opening 'Network' under the 'Administration' menu and plugging in a static IP vice DHCP or going into your router and assigning a specific IP to the MAC that your computer has.

Attached are a pair of images showing how to get to the Network settings. Assigning IP's via your router is a little different since all routers are different - I've attached an example of my Linksys if you have one of those.

Now, if you're speaking of getting a static IP for your MODEM so that you can access your files from the outside then, as mentioned, you either need to pay your ISP more money for a static IP or go for a dynamic DNS service.

Check back if this fails to answer or you need more help.

hi but the thing is that my ubuntu is on my pc which is connected wirelessly to the network and not with the wire so i dont even have a option for the static ip under the network settings

stalker145
August 13th, 2007, 10:55 AM
hi but the thing is that my ubuntu is on my pc which is connected wirelessly to the network and not with the wire so i dont even have a option for the static ip under the network settings

Static IP's are available for wireless the same as they are for wired. You would set it up in the same way and the same location.

switch13
August 13th, 2007, 11:30 AM
Stormbringer

Your tut is great!
But the problem that I have is...

I have installed Ubuntu Dapper Drake 6.06 on my pc at home, which has no internet connection.
Now my question is the following. How do I successfully install SAMBA with all the needed tools for a server with user authentication ect.

I have freshly installed Ubuntu, then downloaded samba 3.0.25b deb package,
installed it with no problems, but when I want to start SAMBA there is no way of starting it.
/etc/init.d/samba start
does not do anything, because there is no samba executable in init.d folder.

Can you please tell me what am I missing?

Can you please try to give me a detailed tut on how to install samba with no internet connection.

Your help would be greatly appreciated!!

wieman01
August 14th, 2007, 07:43 PM
Brilliant HOWTO. Big thank you to the author although she/he has not been on line for a while. Appreciate it.

wieman01
August 14th, 2007, 07:44 PM
Stormbringer

Your tut is great!
But the problem that I have is...

I have installed Ubuntu Dapper Drake 6.06 on my pc at home, which has no internet connection.
Now my question is the following. How do I successfully install SAMBA with all the needed tools for a server with user authentication ect.

I have freshly installed Ubuntu, then downloaded samba 3.0.25b deb package,
installed it with no problems, but when I want to start SAMBA there is no way of starting it.
/etc/init.d/samba start
does not do anything, because there is no samba executable in init.d folder.

Can you please tell me what am I missing?

Can you please try to give me a detailed tut on how to install samba with no internet connection.

Your help would be greatly appreciated!!
Stormbringer has not visited the forums since February as his/her profile tells me.

Are there no SAMBA packages on the Dapper Live CD? There should!

rdagijones
August 16th, 2007, 02:43 PM
I have followed the steps in the original post to establish a Samba peer-to-peer. Everything has processed without errors. I am still having some trouble getting Windows to accept the passwords, but I am working on that. I have read some of the follow-up thread but still have a few questions: I am adding the Linux box to an existing Windows network. I have the Linux box connected from an ethernet card to a D-Link wireless router by a wired LAN connection. Two Windows laptops are connected to the router via wireless. In addition, I have a Lexmark Z65n printer connected to the router via integrated ethernet of the printer. All of the Windows machines print through the router. The printer has an assigned IP address (192.168.0.128 ) and I have dedicated that address to the printer in the D-Link static DHCP client list. How do I configure Samba so that it will find the printer? The printer does not appear in the network. Lexmark has a handy little program for Windows that allows you to search for the Z65n on a network and even reassign the IP address. No such program for linux.:confused:

ahkond
August 17th, 2007, 04:44 AM
Hello samba people. I've got one desktop running Feisty, and another running Windows XP, connected by a router. I keep the Windows box running 24/7, and generally boot up the Ubuntu box every day or so.

I have samba installed on the Ubuntu box, and when I start it up, if I do a "ps -ef", I see two instances of /usr/sbin/nmbd -D running, and two instances of /usr/sbin/smbd -D.

I've set up a samba share called "MyFiles". My samba configuration and the setup of the share & accounts were all done using Stormbringer's guide.

If boot the Ubuntu box, go back to the Windows box and attempt to connect to \\ubuntu-box\MyFiles, I get errors (Windows doesn't see the Ubuntu box on the local network).

BUT:

If I then go back to the Ubuntu box, stop samba and then restart samba (by calling /etc/init.d/samba stop, followed by /etc/init.d/samba start), and then go back to the Windows box and try again, it then works, every time.

I have to stop and restart samba manually to get it to work. This is annoying.

Is there something simple going on here? Is there some link in the chain of startup and config scripts calling each other that is failing during boot-up? Is something allowed for me at the terminal but not the startup process? When I open the terminal and stop samba, I'm prompted for my password, so I'm assuming that something running during startup doesn't have permission to do something important.

It's not even clear to me exactly why samba is running on startup in the first place, though, so I'm not sure where to start looking.

Thanks

-a

ahkond
August 22nd, 2007, 03:31 AM
Here's an update:

samba has completely stopped working. I didn't change anything and now my Windows box cannot see my Ubuntu box at all, even when I stop & restart the samba daemons.

-ahkond

cooldudeny
August 23rd, 2007, 05:56 AM
Static IP's are available for wireless the same as they are for wired. You would set it up in the same way and the same location.

so if i will change it to the static ip address then where do i need to get the ip address to put in the fields ?

where will i get all the info from and once doing the static ip on my ubuntu pc do i have to do anything to my other computers on the network to acess the shared folder on ubuntu ?

wieman01
August 23rd, 2007, 07:05 AM
so if i will change it to the static ip address then where do i need to get the ip address to put in the fields ?

where will i get all the info from and once doing the static ip on my ubuntu pc do i have to do anything to my other computers on the network to acess the shared folder on ubuntu ?
These are basic networking questions, so I suggest that you do some reading on the web or so. You have option in Ubuntu's networking apple and there you can configure static leases and address. These are fundamentals that you should know before you start playing around with your network.

Washi
August 23rd, 2007, 11:31 PM
I just wanted to add another post of thanks for this tutorial =D>

federsel
August 24th, 2007, 05:06 PM
I can not install samab - the system says I have samba-common and smbconig instead. What should I do?

wieman01
August 24th, 2007, 05:42 PM
I can not install samab - the system says I have samba-common and smbconig instead. What should I do?
"samba-common", mate, "samba-common".

federsel
August 24th, 2007, 06:28 PM
I just connected to my pc using "connect to server" and there typing in my ip. I can now reach all the shared files on my pc so I dont need to do anything with samba, or?

wieman01
August 24th, 2007, 06:31 PM
I just connected to my pc using "connect to server" and there typing in my ip. I can now reach all the shared files on my pc so I dont need to do anything with samba, or?
No. :-) Ideally that's the way it works. An Ubuntu machine can browse Windows shares, it's tricky the other way around. Hence this thread.

ahkond
August 25th, 2007, 04:45 AM
wieman01 wrote:


An Ubuntu machine can browse Windows shares, it's tricky the other way around. Hence this thread.

For me, I have to use samba precisely because this isn't true. I can get my Windows PC to see samba shares on my Ubuntu box occasionally (about 1/3 of the time), but I have never been able to get my Ubuntu computer to see Windows shares on my Windows PC. When I try to connect or browse the network, I get prompted to log in to the Windows workgroup, and no matter what account name and password I use, I am prompted again, and again, and again, and again, until I give up. I've tried creating new accounts, changing the passwords, etc. etc. and it never works; Ubuntu just keeps prompting me to log in.

Hence, I use samba shares on my Ubuntu computer, and tell my Windows computer to connect to them, and I use the samba account & password, and that works about 1/3rd of the time because the Windows PC usually can't detect the Ubuntu computer at all and claims that it doesn't exist. When this happens, I copy files back and forth using a USB jump drive.

-a

wieman01
August 25th, 2007, 08:32 AM
wieman01 wrote:



For me, I have to use samba precisely because this isn't true. I can get my Windows PC to see samba shares on my Ubuntu box occasionally (about 1/3 of the time), but I have never been able to get my Ubuntu computer to see Windows shares on my Windows PC. When I try to connect or browse the network, I get prompted to log in to the Windows workgroup, and no matter what account name and password I use, I am prompted again, and again, and again, and again, until I give up. I've tried creating new accounts, changing the passwords, etc. etc. and it never works; Ubuntu just keeps prompting me to log in.

Hence, I use samba shares on my Ubuntu computer, and tell my Windows computer to connect to them, and I use the samba account & password, and that works about 1/3rd of the time because the Windows PC usually can't detect the Ubuntu computer at all and claims that it doesn't exist. When this happens, I copy files back and forth using a USB jump drive.

-a
You are right. That's what I actually meant. Once Samba is installed Ubuntu does see other shared (Windows) drives, but not the other way around.

ahkond
August 25th, 2007, 07:24 PM
You are right. That's what I actually meant. Once Samba is installed Ubuntu does see other shared (Windows) drives, but not the other way around.

In my case, no. I have samba installed on my Ubuntu computer, but it still can't see other shared (Windows) drives. The other way around DOES work (Windows PC can see samba shares that are on the Ubuntu computer).

-a

wieman01
August 25th, 2007, 07:49 PM
In my case, no. I have samba installed on my Ubuntu computer, but it still can't see other shared (Windows) drives. The other way around DOES work (Windows PC can see samba shares that are on the Ubuntu computer).

-a
Weird. It is the opposite way in my case. Anyway...

stalker145
August 26th, 2007, 04:58 AM
so if i will change it to the static ip address then where do i need to get the ip address to put in the fields ?

where will i get all the info from and once doing the static ip on my ubuntu pc do i have to do anything to my other computers on the network to acess the shared folder on ubuntu ?

Check your router, first of all. Depending on your equipment and your present network setup you have a couple of different options.

1) Check your IP range. More than likely it will be on the main page of your router's management page. From there you can determine what IP address to give your static computer. Personally, I have my static IP's assigned by MAC - it keeps the DHCP'd computers from stealing the IP somehow. Also it keeps you from having to go to each individual computer and configuring networking.

2) Just go into your network setup in Ubuntu and plug in an available IP (that you got from your router's management page) and away you go.


These are basic networking questions, so I suggest that you do some reading on the web or so. You have option in Ubuntu's networking apple and there you can configure static leases and address. These are fundamentals that you should know before you start playing around with your network.

RTFM? Nice response. Why waste a post with such statements?

alvinz
August 26th, 2007, 08:12 AM
i LOVE this thread ... THANKS alot !!!

been searching for an available sharing method whole day.
i am using vmware player with Ubuntu Fiesty and this file sharing method is good.

THANKS ! :):KS

wieman01
August 26th, 2007, 09:08 AM
RTFM? Nice response. Why waste a post with such statements?
Goo question. But setting up a SAMBA share, etc. without basic networking knowledge means trouble. That's what I wanted to say. And this thread is a thread relating to network shares and not networking in general.

Nevertheless you have replied appropriately and thanks for it.

MarshallClan
August 29th, 2007, 08:25 PM
Hey All!
Many thanks to Stormbringer for this lovely How-To! You made it nice and smooth for us noobs out here!
_-K-_

miershpedankl
August 30th, 2007, 03:42 AM
I am brand new to Linux and this tutorial was VERY nice to follow. I was able to install and configure Samba successfully, but I am not able to connect from my Windows laptop. I connect with the laptop via a wireless network. When I tried to map a drive I entered \\ip\MyFiles and was prompted to enter my username and password. After entering those I was re-prompted to enter them again, but with the NETBIOSNAME/username. This did not work either, I followed the instructions, so I am aware of what I set as my username and password as well. Any suggestions??

Also - I when I got to the schmod change command I wasn't sure which Terminal to use, or even if it matters. It might be good to clarify at that point in the process.

Additionally - I am not sure I understand what happens after I save and close the "gedit" editor. Where does it go and what does it do?

Lastly - this is what I am trying to do: I have an external HDD as storage and a Bluetooth USB for printing connected to my Ubuntu box (simply b/c it the best location in the house). I want to be able to access and use both of these devices and I understand that Samba is the way to get that done. Am I correct? Will I see the external HDD and Bluetooth USB when I am able to successfully connect to Samba from my Windows laptop?

Thanks so much and, again, GREAT tutorial.

Miershpedankl

wieman01
August 30th, 2007, 07:20 AM
I was able to install and configure Samba successfully, but I am not able to connect from my Windows laptop.
Have you created a SAMBA user account for your Windows user?

sudo smbpasswd -L -a your_username
sudo smbpasswd -L -e your_username

Also - I when I got to the schmod change command I wasn't sure which Terminal to use, or even if it matters. It might be good to clarify at that point in the process.
Any command line tool. There is a terminal tool available in the Gnome menu somewhere (I don't use know, so I cannot tell you exactly where). As long as you open it and see your username and PC name with a prompt, you are ok. :-)

Additionally - I am not sure I understand what happens after I save and close the "gedit" editor. Where does it go and what does it do?
Gedit lets you configure text files which are part of the system. Very much like Notepad in Windows. You edit files, save them, and close Gedit.

Will I see the external HDD and Bluetooth USB when I am able to successfully connect to Samba from my Windows laptop?
The external HD won't be an issue as long as you enable sharing on it. I cannot comment on Bluetooth as I know too little about it.

takeiteezzy
August 31st, 2007, 04:30 PM
Hi,
I have two computers connected to my WRT54G router, one windows xp mce and ones Ubuntu 7.04. I've spent 4 days trying to set up this but still with little success, please somebody help me. I followed this tutorial and basically got pretty close. When I try to map the network drive, it simply says "The specified group does not exist." Yet when I go to My Network Places > View workgroup computers, I see my Ubuntu computer there along with my current xp computer. I double click it and see "MyFiles" and "Printers and Faxes", but if I click MyFiles, it says " \\Secondary\Myfiles is not accessible. You might not have permission to use this network resource. Contact the administrator of this server to find out if you have access permissions. The specified group does not exist." Moreover, I can see my windows computer in Network, in Ubuntu. I can access, read, write, and do whatever I want to my whole shared D drive. In both Ubuntu and XP's network places, both computers appear to be in TERRY, my workgroup (not sure if related to the group in error messages). I can ping my Ubuntu, using either "secondary" or 192.168.1.150 from my XP and I can also ping windows from Ubuntu. I'm building this whole thing to be my mom's birthday present and this is part of a bigger project. Please tell me what I did wrong, as I'm starting to think I'm stupid, having even reinstalled Ubuntu 3 times.

miershpedankl
August 31st, 2007, 11:42 PM
Have you created a SAMBA user account for your Windows user?

Yes, I created a user account as described. I actually completed every step in the tutorial with apparent success.

Thanks for the clarification on the other questions.

miershpedankl

takeiteezzy
September 1st, 2007, 05:08 AM
Hi,
I did some more tweaking ( my post up there), and somehow if I delete my "sudo smbpasswd -L -a Terence" account by adding the argument -x, my windows connects to samba, but asks for password. But if I add back the account in the terminal, the previous error comes out again. Can somebody please help.
Terence

theseeker
September 1st, 2007, 06:58 PM
Hello,

I've followed the instructions of the howto to setup a Vista/Feisty network. Mty smb.conf looks as below:


[global]
; General server settings
netbios name = steppenwolf

workgroup = GERTRUDE
announce version = 5.0
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192
interfaces = lo, eth0
bind interfaces only = true

passdb backend = tdbsam
security = user
null passwords = true
username map = /etc/samba/smbusers
name resolve order = hosts wins bcast

wins support = yes

printing = CUPS
printcap name = CUPS

syslog = 1
syslog only = yes

; NOTE: If you need access to the user home directories uncomment the
; lines below and adjust the settings to your hearts content.
[homes]
valid users = %S
create mode = 0600
directory mode = 0755
browseable = yes
read only = no
veto files = /*.{*}/.*/mail/bin/

; NOTE: Only needed if you run samba as a primary domain controller.
; Not needed as this config doesn't cover that matter.
;[netlogon]
;path = /var/lib/samba/netlogon
;admin users = Administrator
;valid users = %U
;read only = no

; NOTE: Again - only needed if you're running a primary domain controller.
;[Profiles]
;path = /var/lib/samba/profiles
;valid users = %U
;create mode = 0600
;directory mode = 0700
;writeable = yes
;browseable = no

; NOTE: Inside this place you may build a printer driver repository for
; Windows - I'll cover this topic in another HOWTO.
[print$]
path = /var/lib/samba/printers
browseable = yes
guest ok = yes
read only = yes
write list = root
create mask = 0664
directory mask = 0775

[printers]
path = /tmp
printable = yes
guest ok = yes
browseable = no

; Uncomment if you need to share your CD-/DVD-ROM Drive
;[DVD-ROM Drive]
;path = /media/cdrom
;browseable = yes
;read only = yes
;guest ok = yes

[MyFiles]
path = /home/shares/

read only = no
guest ok = no
create mask = 0644
directory mask = 0755
force user = giorgos
force group = giorgos
available = no
browsable = yes
public = no
writable = no

I do all required steps as mentioned in the howto, and when the time comes to connect from my laptop (Vista) to my Feisty box, Vista don't see any \\steppenwolf\MyFiles location. When I try to connect from my Ubuntu box to Vista through Places --> Connect to server... I can see both drives of my laptop (shown as $C, $G) but, no access there as well.

I am frustrated! I think networking should be smoother, not having to get your hands all dirty to not manage to set up the network in the end.

Please, any support is much appreciated!

Thanks!

metal_hed
September 8th, 2007, 05:29 PM
i followed this tut and at first all was well i was able to map the drive to my vista machine. now however, every time i try to connect to samba is says that "an extended error has occurred". i didn't change any settings what so ever and i can't seem to figure out why this happens. when i connect it asks for username and p/w so i know it connects to the path, it accepts the username and p/w because if i put wrong info it asks to enter again, yet i always get that error showing up after.

if anyone has a solution could they please help out!

much appreciated

wobwill
September 11th, 2007, 03:49 PM
Hi,

I have a question about wireless security.

XP is hardwired to my router while Ubuntu is connected wirelessly.

If I follow the advice in the guide won't I be disabling Samba as it will not be associated with my wireless card? If so how do I ensure everything is secure? Or have a misunderstood the bit on security.

Just so you know. I followed the guide exactly up to that point and it works an absolute treat - Thank You.

Will.

wieman01
September 11th, 2007, 03:53 PM
Hi,

I have a question about wireless security.

XP is hardwired to my router while Ubuntu is connected wirelessly.

If I follow the advice in the guide won't I be disabling Samba as it will not be associated with my wireless card? If so how do I ensure everything is secure? Or have a misunderstood the bit on security.

Just so you know. I followed the guide exactly up to that point and it works an absolute treat - Thank You.

Will.
Wether it is wireless or Ethernet makes no difference at all as long as your wireless network is secured i.e. encrypted (ideally WPA2 or WPA). That's all you need to worry about in that respect.

wobwill
September 11th, 2007, 07:41 PM
Thanks for getting back to me.

My network is secured like this

1) disabled ssid broadcast
2) MAC Filtering enabled
3) 128 hex WEP key

I know I should use WPA instead but it was such a pain getting the whole thing set up in the first place i've been a bit shy since. Especially as the problem was with a house mates wireless link (which I know makes it even worse)!

Will

wobwill
September 11th, 2007, 07:49 PM
I have a problem with seeing shared documents.

I have set up Samba as this guide says and have a shared drive between ubuntu and windows - wehay!!

I have since shared my XP data drive and my documents with the shared drive. However when I go into samba (/home/samba) or into network I can't see any of the files or folders on my XP machine. Have I done something wrong? What should I do to fix it?

Will

wieman01
September 11th, 2007, 07:51 PM
Thanks for getting back to me.

My network is secured like this

1) disabled ssid broadcast
2) MAC Filtering enabled
3) 128 hex WEP key

I know I should use WPA instead but it was such a pain getting the whole thing set up in the first place i've been a bit shy since. Especially as the problem was with a house mates wireless link (which I know makes it even worse)!

Will
Alright... I only mentioned it to let you know that WEP is highly insecure. Even disabling ESSID broadcast and enabling MAC filtering won't protect you as Aircrack is able to determine the ESSID immediately and cloning of MAC addresses is a piece of cake. Nevertheless it is better than nothing... :-)

wobwill
September 11th, 2007, 07:57 PM
I've been reading your post on WPA secuity. It has become the next job on my to do list!

wieman01
September 11th, 2007, 08:02 PM
I've been reading your post on WPA secuity. It has become the next job on my to do list!
No prob. Just post there if you have problems. You might have to replace the current wireless driver with "ndiswrapper". But we get to that later. See you then!

wobwill
September 11th, 2007, 08:17 PM
going back to my other question,

Can anyone tell me why i'm not seeing the files and folders from my xp machine that i've shared with ubuntu?

In XP i've shared some files and folders with the shared drive but they don't appear in samba or on the network drive in ubuntu.

Will

haydnc
September 11th, 2007, 10:56 PM
There seems to be a trend that every time a new version of Ubuntu comes out the whole samba-networking thing stops working for a while.

In particular the ability to use security = share so that any one connecting to the new Ubuntu box can access data without messing around with user accounts on the Ubuntu box.

I have a test machine running Gutsy with this exact problem, while everything is working perfectly under Feisty and the Gutsy machine can connect to Feisty and Windows shares but nothing can connect back to the Gutsy machine.

Does anyone know of a foolproof way to avoid this ongoing problem, or do I just need to wait until the final release of Gutsy, then endure the month or so of people complaining they can't connect to Samba shares before someone works out what's wrong and how to fix it?

A HOWTO that doesn't use the intermittent security=share but also does not require that every windows user have an account set up on the Ubuntu machine would be good if that's even possible.

If it's not possible could someone please tell me how to get this working on a Gutsy machine?

haydnc
September 11th, 2007, 11:29 PM
Answered my own question!

Apparently the structure of the smb.conf has changed slightly (again) and there's now an annoying little line in there that says:

valid users = %S

If you comment that out and enable the one below it which says something like:
; guest ok = yes

in combination with using security = share

file sharing still works between Gutsy and whatever.

I hope this makes some sense and is useful to someone. :)

sbrown1038v
September 18th, 2007, 04:51 PM
Just wanted to thank you for this great 'HOW-TO'. I think I could not get samba working because I didn't run smbpasswd with the -e switch to enable the account after setting the password. It's working great now!

antonr
September 19th, 2007, 02:08 AM
Following this guide, I got samba working (Kubuntu 7.04 <-> WinXP), but without needing to reboot WinXP. Instead of rebooting WinXP, I did the following in a DOS Console, to restart the network:

net stop netman
net start netman

This option should be useful when you don't want to reboot.

antonr
September 19th, 2007, 02:39 AM
Stormbringer, just a few typos in the guide:

1:


Add the following lines to the [general] section of your smb.conf to achieve that goal:

But there is no "[general]" section in the provided smb.conf file.
It looks like you meant "[global]".


2:

In the supplied smb.conf, it has:


force group = YOUR_USERGROUP

but you later refer to it as:


-> force group = YOUR_USERNAME

It looks like the second one is correct. (Well, it worked for me :)

Hope that helps.
Regards.

MisanthropicOne
September 19th, 2007, 07:24 AM
Thank you, Stormbringer for this great little walk-thru. Moving files around between my windows installs and my roommate's machine to my mythtv box should no longer be a problem for either of us.

JawsThemeSwimming428
September 21st, 2007, 02:39 AM
This is indeed a great guide. I had previously tried to access my Windows files, via Samba, and was unsuccessful (in Dapper). I followed the guide word for word and was able to see my shared folder on my Feisty machine from Windows Vista Home Premium. However, when I rebooted Feisty I did not have access to the mapped drive from Vista. It said The network path could not be found. I wasn't sure what happened, as both of these machines have static IP's and I thought it was supposed to reconnect at logon. I disconnected the drive and tried to re-establish it and when I was trying to map the drive in Vista it couldn't even see Feisty on my network. I am not sure what happened. I am trying to figure it out right now but if someone could help me out I would be very appreciative. Thanks!

JawsThemeSwimming428
September 21st, 2007, 02:57 AM
One thing I did notice... I tried to share my home folder, but when I rebooted I was presented with the following message onces I typed my password and hit Enter to log in:

" User's $HOME/.dmrc file is being ignored. This prevents the default session and language from being saved. File should be owned by user and have 644 permissions. User's $HOME directory must be owned by user and not writable by other users."

I am not quite sure what that means or what I should do to fix it (or if it has anything to do with my network folder access problem above... In smb.conf I elected to share /home/willy which is my home directory).

JawsThemeSwimming428
September 21st, 2007, 03:04 PM
I'm still trying to figure out what is happening. Anyone have any idea?

wieman01
September 22nd, 2007, 08:14 AM
I'm still trying to figure out what is happening. Anyone have any idea?

I have only limited experience as far as Samba is concerned and none in conjunction with Vista. But... are your Vista and Ubuntu user name with which you to attempt to log on identical? This could explain the error message concerning permissions.

I also found this, perhaps it is worthwhile taking a look at it:

http://www.builderau.com.au/blogs/codemonkeybusiness/viewblogpost.htm?p=339270746

vassalle
September 22nd, 2007, 07:17 PM
I tried a search but couldn't find what I'm looking for. I don't know if this have been asked before (going through 44 pages is quite time consuming).. So, bare with me :D

Is there a way for me to share my folder without the person accessing the folder having to put in his user account & password? Something like sharing from an XP box to another, just right click and share folder - no passwords, or user accounts needed.

I've read somewhere that changing the option security = share might allow this but somehow it didn't work for me.. Hopefully someone here can come up with a solution and end this misery. Thanks in advance!

JawsThemeSwimming428
September 22nd, 2007, 09:42 PM
Thanks, I am trying that link right now. I wasn't aware that the usernames had to be identical? My Vista username is willy-velocitymicro and my Feisty username is willy. Do I have to change one?

JawsThemeSwimming428
September 22nd, 2007, 10:53 PM
Vista Home Premium does not have secpol.msc or gpedit.msc, or I can not find it. It says it can't be found. Is there another way to do it?

JawsThemeSwimming428
September 23rd, 2007, 07:12 AM
Thanks wiema01... I think I got it working. Firestarter was getting in the way and after I re-did my smb.conf everything seems to be in order.

One question though...on my Feisty machine when I go to Network and open up my Windows Network, all it does is open up an empty folder. Do I need to do something else so that I can browse my Vista machine from Feisty?( I am able to browse my Feisty shares from Vista)

wieman01
September 23rd, 2007, 08:38 AM
Thanks wiema01... I think I got it working. Firestarter was getting in the way and after I re-did my smb.conf everything seems to be in order.

One question though...on my Feisty machine when I go to Network and open up my Windows Network, all it does is open up an empty folder. Do I need to do something else so that I can browse my Vista machine from Feisty?( I am able to browse my Feisty shares from Vista)
Ah, Firestarter... ;-) I remember having trouble with that as well.

You need to enable the "share a folder" function in Vista. At least that is so in WinXP. You would then be able to see that folder from Feisty.

serban
September 24th, 2007, 06:18 AM
Hello,
after reading the posts here, I still didn't resolve my problem (I bet it's something easy, I just don't see it).
So .. I can ping Xubuntu & XP (eachother) but that's about it. Here is what I have:
root@tata1:/home/tata# smbclient -L localhost -U%
Domain=[TATA] OS=[Unix] Server=[Samba 3.0.24]

Sharename Type Comment
--------- ---- -------
print$ Disk
MyFiles Disk
IPC$ IPC IPC Service (Samba 3.0.24)
Domain=[TATA] OS=[Unix] Server=[Samba 3.0.24]

Server Comment
--------- -------
XUBUNTU Samba 3.0.24

Workgroup Master
--------- -------
TATA XUBUNTU



and this is my smb.conf :

[global]
; General server settings
netbios name = xubuntu

workgroup = tata
announce version = 5.0
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192

passdb backend = tdbsam
security = user
null passwords = true
username map = /etc/samba/smbusers
name resolve order = hosts wins bcast

wins support = yes

printing = CUPS
printcap name = CUPS

syslog = 1
syslog only = yes

; NOTE: If you need access to the user home directories uncomment the
; lines below and adjust the settings to your hearts content.
;[homes]
;valid users = %S
;create mode = 0600
;directory mode = 0755
;browseable = no
;read only = no
;veto files = /*.{*}/.*/mail/bin/

; NOTE: Only needed if you run samba as a primary domain controller.
; Not needed as this config doesn't cover that matter.
;[netlogon]
;path = /var/lib/samba/netlogon
;admin users = Administrator
;valid users = %U
;read only = no

; NOTE: Again - only needed if you're running a primary domain controller.
;[Profiles]
;path = /var/lib/samba/profiles
;valid users = %U
;create mode = 0600
;directory mode = 0700
;writeable = yes
;browseable = no

; NOTE: Inside this place you may build a printer driver repository for
; Windows - I'll cover this topic in another HOWTO.
[print$]
path = /var/lib/samba/printers
browseable = yes
guest ok = yes
read only = yes
write list = root
create mask = 0664
directory mask = 0775

[printers]
path = /tmp
printable = yes
guest ok = yes
browseable = no

; Uncomment if you need to share your CD-/DVD-ROM Drive
;[DVD-ROM Drive]
;path = /media/cdrom
;browseable = yes
;read only = yes
;guest ok = yes

[MyFiles]
path = /home/samba
read only = no
guest ok = no
create mask = 0644
directory mask = 0755
force user = tata
force group = tata
available = yes
browsable = yes
public = yes
writable = yes

The username in XP is "tata" (as in Xubuntu) with the same password as in Xubuntu; the workgroup in xp is "tata" (as in Xubuntu)

When I request "\\192.168.2.3\MyFiles" I get no answer (by the way, the IP is correct)
Can somebody give me some hints? - I'm going nuts.
Thank you

It's me again :)
Actually it works ... on any other computer but the one I was trying. It must be something wrong with that XP. It works on another XP and two Vistas so I'm happy.
Thank you for all the information you put here - that makes us, the beginners, not to give up.
Serban

dinbotclone
September 25th, 2007, 01:47 PM
aswome job...now i can get rid of my windos box and use ubuntu as my file/print server....again very easy how-to much bettee than 90% of the other ones i have used in the past

JawsThemeSwimming428
September 26th, 2007, 06:10 PM
serban,

If you have Firestarter or a similar Windows firewall installed you have to create rules allowing them to connect to the machines on your network. That was my issue and once I created the rules I was able to browse the machines. Something to check out.

wieman01
September 26th, 2007, 06:21 PM
serban,

If you have Firestarter or a similar Windows firewall installed you have to create rules allowing them to connect to the machines on your network. That was my issue and once I created the rules I was able to browse the machines. Something to check out.
Open port 137-139 and 445 for inbound and outbound traffic I suppose.

Duwady
September 30th, 2007, 02:45 PM
Just wanted to thank you for making my day. I was frustrated since last 2 weeks. and made such a mess that I had to reinstall many times.

But following your how-to, I am up and running.... tra la la la la

Once again, THANK YOU!!!!!!!

Now, I can face my wife. :)

superpenguin79
October 1st, 2007, 03:00 AM
Thanks for the tip on the firewall.. I am familiar with the networking, but sometimes you forget the simple stuff.. ;)

acorn22
October 6th, 2007, 09:03 PM
Thanks for the guide. I got prety far I think, but I have one hiccup.

I have a linux computer next to an XP computer and I have followed all the directions on the linux side. So far so good. (Enabled WINS) However when I go the the windows computer and try to map a network drive It prompts me for a username and password. No usernames/passwords work. What is wrong?

Thanks

Duwady
October 6th, 2007, 09:43 PM
I was also in the same boat, but I followed the step given in the first post.

The problem seems to be on the Windows side, please look at the steps given again, and retrace your steps. I am sure you will catch it the second time around.

jtreg
October 8th, 2007, 09:26 AM
thanks for info... as I have my network connection wired up as Automatic DHCP (I cannot connect to my router to internet otherwise... If I do this I cannot share files with Windows XP machines via Samba... what should I do?

Duwady
October 8th, 2007, 01:59 PM
The only problem with DHCP configuration is that it keeps on changing. Otherwise, the above will work with DHCP also.

If you can see it, but cannot connect to it, then the issue is again the windows. I anabled WINS in Samba, and followed this step on the XP machine.

QUOTE
If you had to change "wins support" to "no" above skip this step!

- Click "START"
- Click "Control Panel"
- Click "Network Connections"
- Find your "LAN Connection"
- Right-click the icon and select "Properties"
- Select the "TCP/IP" Protocol and click the "Properties" button
- Click "Advanced"
- Select the third Tab entitled "WINS"
- Click "Add"
- Type in the ip-address of your Linux box
- Click "Add"
- Select "Use NetBIOS over TCP/IP"
- Click "OK"
- Click "OK"
- Click "OK"
- Reboot Windows

UNQUOTE

After restarting the computer, I could see it, and access it. This step has to be done before you map a network.

If it does ask for the password, give "root" as id, and your root password, though I do not think it will ask.

Let me know if this helps, otherwise I will let you know what else I did.

Duwady
October 8th, 2007, 02:02 PM
Also, it is not that difficult to change the IP address on the linux machine from Dynamic (from DHCP) to Static (given manually), without being out of the internet loop. You may not even need to change the things on the router.

Let me know if you want to try this out.

lionround
October 9th, 2007, 01:40 AM
I have an external USB Lacie HD (with Seagate drive) 250 gig, fat32. It is mounted at /media/LACIE with a folder on it at /media/LACIE/music. I have about a gig of music in the folder.

I want to be able to share/read/write files to and from the drive from my XP and 98 machines.

I am using Ubuntu Feisty Fawn 2.6.20-16-generic.

I have Samba installed and properly configured (I hope.)

The problem is that when I try to access it from either my XP or 98 or Ubuntu machines through the network, it shows up in Network Neighborhood under \\Ubuntu\Lacie (note the lack of the media in the path) and when I click on it is "inaccessible." I can access it if I just go to Places -> Lacie.

The owner permissions are set to david (that's me) with read and write and the root group. It won't allow me to change ANY of these options.

I am not using my Ubuntu box as a WINS server. Should I be?

I tried gksudo nautilus and could not change anything.

Suggestions please.

Duwady
October 9th, 2007, 02:08 PM
I believe "\\Ubuntu\Lacie" is showing the share name, and not the path, but I may be wrong as I am still learning. :)

When you add users in Samba, I think you should have the same userid and same password that is used in your XP (Don't know about 98, but it could be same). That is how I set it up, and now it is working.

The "how-to" does give an option of what to do if Ubuntu is WINS and what to do if it is not, so I guess that is not mandatory.

Hope this helps. Remember, I am as new as you, but just got lucky and got it working by following the how-to.

adamjs
October 10th, 2007, 10:58 PM
how would you edit the config file to only allow particular users access to a particular share?
AJS

Donkor
October 13th, 2007, 07:30 AM
Trying to get it enabled on my network. I have a static IP, but don't want to enable WINS since I've quite a few computers that would have to be modified in order to connect.

This is my config


[global]
netbios name = dave
server string =
workgroup = HOME
announce version = 5.0
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_$

passdb backend = tdbsam
security = user
null passwords = true
username map = /etc/samba/smbusers
name resolve order = hosts bcast
syslog = 1
syslog only = yes
[data]
path = /home/dave/data
browseable = yes
read only = no
guest ok = yes
create mask = 0644
directory mask = 0755
force user = XP
force group = HOME


Workgroup name is HOME
The account name I'm trying to access it with is named XP and the password I used with "useradd" is my windows password. I CHMOD'ed the directory to 777 but it still can't access it because I get the "The specified group does not exist" error message, though I can see a list of folders the computer is sharing.

What did I do wrong?

Alpinist
October 14th, 2007, 09:05 PM
Stormbringer, Thanks for the tutorial. I have been struggling with Samba for a while now and your easy to follow guide finally got me fully configured and working correctly.

inkster21
October 18th, 2007, 09:58 AM
Thank you so much for this one... really great guide! especially for me a newbie.. how wud i know that i nid to type those commands on a terminal window rather than on the alt F2 thing...thank God i ran on to this. really im a total newbie in ubuntu its not like the user friendly interface in windows. no offense^^ but i really want to learn about Ubuntu!

Maddmaxx
October 19th, 2007, 06:43 PM
Just wondering what was changed in Samba after the 7.10 upgrade... I have my shared folders mapped in windows and my password was saved in windows so when I clicked a network drive it wouldn't ask for password. Now after the upgrade it has been asking for the password, and when I enter the same password again it's a no-go. I hope I'm not hijacking this thread, it just seems related. Just hoping that some of us less experienced users can be enlightened.

Thank you in advance!

g2g591
October 20th, 2007, 01:48 AM
I've been following the guide https://help.ubuntu.com/community/MountWindowsSharesPermanently , and when I mount -a I get 8177: tree connect failed: ERRSRV - ERRinvnetname (Invalid network name in tree connect.)
SMB connection failed
The computers name is OLD and the share name is also OLD (named so because its a old '98 with a new network card slapped in)
(https://help.ubuntu.com/community/MountWindowsSharesPermanently)

Maddmaxx
October 20th, 2007, 05:13 PM
smbusers and smb.conf were wiped, had to reconfigure, all is well for now...

jim8433
October 20th, 2007, 08:45 PM
I need help to resolve Samba setup with Gutsy. I had no problems under Feisty, but Gutsy has me perplexed. I have an XP client that can at times see my Gutsy desktop computer, but I get message indicating that XP may not have permission to connect to my Gutsy server. I have tried various adjustments to my smb.conf, even used SWAT to try to put together a workable smb.conf. When I can see my XP on Samba from desktop, I can see shared files, but cannot even see my local shares on my Samba server box. Can anyone help me clear this up for me? I love Ubuntu.

kosekiseiji
October 21st, 2007, 12:03 AM
can someone help me? I've set up a samba share from this tutorial and it works from other computers (namely a mac) if I use it's terminal and use smbclient //servername/share

but can't get it working using smb://servername/share

what am I doing wrong?

I've used debian before and haven't had a problem... usually it's just a case of adding a password using smbpasswd

I'm using gutsy
here is my smb.conf
[global]
; General server settings
netbios name = timbu
server string =
workgroup = bruces
announce version = 5.0
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192

passdb backend = tdbsam
security = user
null passwords = true
username map = /etc/samba/smbusers
name resolve order = hosts wins bcast

wins support = yes

printing = CUPS
printcap name = CUPS

syslog = 1
syslog only = yes

; NOTE: If you need access to the user home directories uncomment the
; lines below and adjust the settings to your hearts content.
;[homes]
;valid users = %S
;create mode = 0600
;directory mode = 0755
;browseable = no
;read only = no
;veto files = /*.{*}/.*/mail/bin/

; NOTE: Only needed if you run samba as a primary domain controller.
; Not needed as this config doesn't cover that matter.
;[netlogon]
;path = /var/lib/samba/netlogon
;admin users = Administrator
;valid users = %U
;read only = no

; NOTE: Again - only needed if you're running a primary domain controller.
;[Profiles]
;path = /var/lib/samba/profiles
;valid users = %U
;create mode = 0600
;directory mode = 0700
;writeable = yes
;browseable = no

; NOTE: Inside this place you may build a printer driver repository for
; Windows - I'll cover this topic in another HOWTO.
[print$]
path = /var/lib/samba/printers
browseable = yes
guest ok = yes
read only = yes
write list = root
create mask = 0664
directory mask = 0775

[printers]
path = /tmp
printable = yes
guest ok = yes
browseable = no

; Uncomment if you need to share your CD-/DVD-ROM Drive
;[DVD-ROM Drive]
;path = /media/cdrom
;browseable = yes
;read only = yes
;guest ok = yes

[MyFiles]
path = /home/tim/Music/
browseable = yes
read only = no
guest ok = no
create mask = 0644
directory mask = 0755
force user = tim
force group = tim

rcane84
October 21st, 2007, 01:05 AM
Hello everyone,

A really helpful walk-through, but I'm not out of the woods yet. I have Ubuntu installed on an older P3 desktop and Windows XP Pro on a P4 Laptop. I have been trying to set up a network and have had some success but it is not all the way there. From the Ubuntu desktop I am able to see the shared files on my Windows computer and am able to transfer them over no problem. The thing is I can't do it the other way. When I try to access what should be my Ubuntu shared folder (all of \home) I am unable to do so from XP machine.

I set samba and decided to go with a fixed dhcp lease. Here is the code (sudo gedit /etc/samba/smb.conf) I hopefully configured right.

[global]
; General server settings
netbios name = RICHARD


workgroup = WORKGROUP
announce version = 5.0
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE
SO_RCVBUF=8192 SO_SNDBUF=8192

passdb backend = tdbsam
security = user
null passwords = true

username map = /etc/samba/smbusers
name resolve order = hosts wins bcast

wins support = no

printing = CUPS
printcap name = CUPS

syslog = 1
syslog only = yes


; NOTE: If you need access to the user home directories uncomment the
; lines below and adjust the settings to your hearts content.
;[homes]
valid users = %S
create mode = 0600
directory mode = 0755

browseable = yes
read only = no
veto files = /*.{*}/.*/mail/bin/

; NOTE: Only needed if you run samba as a primary domain controller.
; Not needed as this config doesn't cover that matter.

;[netlogon]
;path = /var/lib/samba/netlogon
;admin users = Administrator
;valid users = %U
;read only = no

; NOTE: Again - only needed if you're running a primary domain controller.

;[Profiles]
;path = /var/lib/samba/profiles
;valid users = %U
;create mode = 0600
;directory mode = 0700
;writeable = yes
;browseable = no

; NOTE: Inside this place you may build a printer driver repository for

; Windows - I'll cover this topic in another HOWTO.
server string = richard
[print$]
path = /var/lib/samba/printers
browseable = yes
guest ok = yes
read only = yes
write list = root
create mask = 0664

directory mask = 0775

[printers]
path = /tmp
printable = yes
guest ok = yes
browseable = no

; Uncomment if you need to share your CD-/DVD-ROM Drive
;[DVD-ROM Drive]

;path = /media/cdrom
;browseable = yes
;read only = yes
;guest ok = yes

[MyFiles]
path = /home
browseable = yes
read only = no
guest ok = no
create mask = 0644

directory mask = 0755
force user = RICHARD
force group = RICHARD
available = yes
public = yes
writable = no

[samba]
path = /home/samba
available = yes
browseable = no
public = yes
writable = yes


I have tried disconnecting both the windows firewall and the Telus Internet Security firewall (internet access provider security) and it hasn’t made any difference. I seem to be doing fine until I get to this part:

With WINS disabled:
- Click "START"
- Right-click "My Computer"
- Select "Map network drive"
- Choose the drive letter
- Type \\<ip-address>\MyFiles
NOTE: To find out the ip-address of your Linux box type "ifconfig" inside a terminal and find the ip for the correct interface (i.e. eth0). Don't forget to adjust the sharename to the name you chose above.
- Click "Finish"

I followed this I get a pop up window saying “Attempting to contact \\192.168.0.101\MyFiles...” then I have to enter my username and password and the same window asking me to enter my username and passoword pops up over and over. I’ve tried typing “Richard” – the computer’s name instead of the ip address with no luck. I’ve also tried varying the “MyFiles part” with \home with no luck. I’m also running AVG free edition for linux does that make a difference?

I’ve made sure that \home is a shared folder in Ubuntu under system>administration>shared folders. Please let me know if any of you have some suggestions I might try. I think I may have also done something like “ chmod 0770 \home” in the terminal. I probably shouldn’t have though I don’t know if it wrecked it. I can’t remember why I did it. It was super early.

Thanks for the help!

Richard

BLTicklemonster
October 21st, 2007, 04:07 AM
I give up. I had finally gotten my ubuntu machine to share to xp, and vice versa, then the last gutsy upgrade happened, and I am back to square one. Thing is, I don't remember exactly what got the network going the first time, and nothing here has gotten it going again.

This is totally frustrating. We took a hundred or so pictures of my grandson today, and I wanted to share them to upstairs. First time to use the network since the upgrade. Dang.

olavjunior
October 21st, 2007, 06:58 PM
I don't quite get this.. Windows can access my ubuntu, but when I try to access windows from ubuntu, it asks me for a username and password. WHY?

EDIT: ok, good idea to share something on the xp machine. Haha, stupid! My mates fault :)

dolphoneman
October 21st, 2007, 10:44 PM
Stormbringer, even though this HOWTO is over a year old, it still holds water and works great.

Thank you for taking the time to write and post it.

DasCrushinator
October 22nd, 2007, 04:52 AM
I followed this guide on Gutsy, but I am having trouble connecting. I get this error when I try:

http://img90.imageshack.us/img90/1442/screenshotnautilusmh0.png

Troberg
October 23rd, 2007, 06:54 PM
Wonderful guide, worked like a charm on six different machines running Kubuntu Gutsy.

On three of the machines, though, there is a slight hitch. Whenever I reboot the machine, the samba service does not start correctly. It's set to start on boot, and if I look at it in system settings, it believes it's running until I try to restart it, so it has probably tried to start it at some time during boot. If I restart it, it runs perfectly.

Any ideas?

wieman01
October 24th, 2007, 04:02 AM
Wonderful guide, worked like a charm on six different machines running Kubuntu Gutsy.

On three of the machines, though, there is a slight hitch. Whenever I reboot the machine, the samba service does not start correctly. It's set to start on boot, and if I look at it in system settings, it believes it's running until I try to restart it, so it has probably tried to start it at some time during boot. If I restart it, it runs perfectly.

Any ideas?
Perhaps a conflict with "Firestarter"?

petersfreeman
October 24th, 2007, 04:56 AM
Thank you very much, Stormbringer! Not only did I get everything working perfectly by following your advice, I also solved a nagging windows problem that I was having on the network.

I really appreciated that you took the time to document it so unambiguously.

Cheers,

Peter

NZ-Wanderer
October 24th, 2007, 04:57 AM
Just want to say thank you to the thread author for his how-to, My Kubuntu Gutsy now talks very happily with my Vista Ultimate and XP machines and visa versa:) :)

Troberg
October 25th, 2007, 05:16 AM
Perhaps a conflict with "Firestarter"?

Nope, it's note even installed.

Duwady
October 25th, 2007, 01:57 PM
I was playing with Server 6.06, and followed this steps, and was very happy.

Now I wiped it all, and installed Gutsy Desktop. Is the steps mentioned here still valid for Gutsy?

Thanks.

Troberg
October 25th, 2007, 02:04 PM
Is the steps mentioned here still valid for Gutsy?

Worked nicely for me, except for the startup issue I mentioned, but that was only on a few machines, the rest worked perfectly.

wieman01
October 25th, 2007, 02:04 PM
I was playing with Server 6.06, and followed this steps, and was very happy.

Now I wiped it all, and installed Gutsy Desktop. Is the steps mentioned here still valid for Gutsy?

Thanks.
Affirmative. Clearance to go ahead. :-)

Duwady
October 25th, 2007, 10:57 PM
Just followed it on Gutsy... and it rocks!!!!! :)

haglv
October 26th, 2007, 01:59 AM
[I have installed and configured samba on my laptop with Ubuntu which is networked wirelessly to 2 window computers. The Window computers can access the laptop but the laptop gets the message "Folder contentscan't be displayed, cannot display the contents of Windows Network:harry"
Help
Harry

Krextyl
October 27th, 2007, 06:52 PM
Hey nice How to, so I got everything up and running just a the instructions say. I got a logical Z drive on my windows machine in which I am able to drag and drop files to and from my linux machine. But when I try to do the same on the Linux machine, I get an error from that end - see the image I've attached. I was trying to access it from pulldown Places>Network>Windows Network>Nuthouse (workgroup name)>Desktop (name of one of the machines on my LAN which has shared folders on it), thats when I got the message I attached. Please let me know if I going about this correctly, I am still new, :biggrin:

Krextyl
October 27th, 2007, 06:57 PM
Another side note and probably much more advanced, possibly warranting a different thread - I have a PS3 on my LAN, is there a way to setup a interface with it (even if only on the linux end) to move files back and forth like multimedia movies, audio etc.. Just Pondering the thought of it makes me say Cool! I've been told that the PS3 system is operated by a linux based system, not sure on the validity of that and if that even helps or not - but it would still be awesome to directly communicate with it,especially to use it as a media server over my network.

Gaztech
October 28th, 2007, 04:55 PM
Apologies if this has already been asked and answered (this is a long thread :))

I've got Samba share setup and it's happy with my XP PC. However I want to do the reverse and add some windows shares to my Linux box basically, my music and movies folder on my xp machine.

If I create a mount point in say /media/my_win_share and mount it permanently (so it is mounted whenever I turn on my ubuntu machine) will it create problems if I boot up the ubuntu machine without the XP machine being switched on i.e. does the share not being present muck up the ubuntu file system in any way?

I was planning on using instructions along the lines of this and using the smbfs package:

https://help.ubuntu.com/community/MountWindowsSharesPermanently

There is a section at the end that makes mention of bad things happening if the server isn’t present, can someone confirm this is (or isn't) the case and if so is there a way round it?

Thanks in advance for any help :)

Gaz

PS this is on Kubuntu 7.10!

suzyweb
October 29th, 2007, 12:58 PM
Thanks so much for this wonderful guide!

I encountered no problems until I got on my Windows machine and tried to log into my Linux machine. It asks me for a name and password then when I enter the name and password for my Linux box it gives me and error that says:

The network path 192.168.0.4\home\Samba could not be found.

Any clue what this means?

Thanks for all your help!

jaydeflix
October 29th, 2007, 07:15 PM
Ok, so, I got it set up so that I can see the share from Windows, I can map it, no password asked for, but, I can't actually *see* the subfolders. It's 0777 across the board, all the way down to the files. smb://127.0.0.1/media works fine from the ubuntu box. What might I be missing (besides a boatload of info in this to help you answer me...)

werdna5225
October 29th, 2007, 11:54 PM
I'm sorry if this has already been asked, but when I try to map the network drive, I get an error that says the path could not be found. Does anyone know what the problem could be? Also, the ubuntu computer is found in the workgroup but when i try to access the ubuntu computer i get the login dialogue but can't seem to get it to ok access.

Troberg
October 30th, 2007, 08:08 AM
Another small problem I've noticed:

I'm sharing files with international characters, in my case the Swedish Å, Ä and Ö. Windows and Linux apparently has different ideas about how to represent these characters, and they come out as pairs of other characters.

Yeah, I know using international characters is begging for trouble, but it's too many files with to many interdependencies to rename with a reasonable effort.

Any ideas?


I'm sorry if this has already been asked, but when I try to map the network drive, I get an error that says the path could not be found.

When I get it, it's because the Samba service has failed to start. Try to restart it (don't trust the system when it's telling you it's running, just restart it). If you get a message that the service can't be stopped because it's not running, you've got the same problem as I got. In that case, just start it manually. I have no idea why this is happening or how to get it to start properly without manual intervention.

yashoda
October 31st, 2007, 09:54 AM
I've been reading this HOWTO for 2 days now!

I was just about to give up, when I noticed that the XP machine was recognising my Ubuntu laptop!

but when I typed my username and password in, they weren't accepted!

I've used the password setting commands again, to ensure I am typing in the correct password.

Any advice?


ps. I do agree though, that this is the most straightforward HOWTO on Samba yet!

Troberg
October 31st, 2007, 09:57 AM
but when I typed my username and password in, they weren't accepted!

Are you sure you got the workgroup right? That caused me some problems much like yours when I hurried a bit too much on one machine.

Otherwise, check caps lock. :)

yashoda
October 31st, 2007, 10:01 AM
Hi Troberg,

Thanks for replying.

Yeah, i got the Workgroup in Caps, cos that's how it showed in Windows, when I checked the Computer Name.

will try as, "Mshome" instead.

yashoda
October 31st, 2007, 10:31 AM
nope... still asks for username, and password which don't seem to be correct.

Scimu
October 31st, 2007, 03:26 PM
Thanks a lot for this, I have networking all setup now! :D

Krextyl
October 31st, 2007, 05:52 PM
Anybody? posts #476 and #477

Thanks

Wharf Rat
November 3rd, 2007, 05:35 PM
Stormbringer,

I finally carefully followed your instructions. It works! My wife's XP laptop can share files and print to my Ubuntu desktop.

Thank you very much!!

For those of you still having problems, look at the Windows machine settings. My two Ubuntu machines talked just fine -- Windows could never make the connection.

de_valentin
November 6th, 2007, 08:16 AM
Hi there,

I received an error here

1.1 Starting samba and setting up user accounts

Let us fire up samba for the first time. Type:

Code:

sudo /etc/init.d/samba start

There shouldn't be any errors - if you are presented with an error message make sure everything is correct (search for typos and/or invalid paths).

it reads

command not found:confused:

superdif
November 6th, 2007, 10:19 PM
nope... still asks for username, and password which don't seem to be correct.

Did you find any solution anywhere for this problem. I ask because I have the same problem.

From my Kubuntu machine I can access the shares on the Windows machines, but not vice versa. :(

saphyrre
November 7th, 2007, 01:56 AM
Hi there,

I received an error here

1.1 Starting samba and setting up user accounts

Let us fire up samba for the first time. Type:

Code:

sudo /etc/init.d/samba start

There shouldn't be any errors - if you are presented with an error message make sure everything is correct (search for typos and/or invalid paths).

it reads

command not found:confused:




Try this:

sudo /etc/init.d/smb start


Off-note, Stormbringer, you are a peacebringer to me:)... i have read over 20 how-to's about samba, this is by far the best one; i was able to access samba shares from both Vista and Xp clients.

Thanks a lot!!

LittleDonnieJ
November 8th, 2007, 07:02 PM
Dude... Stormbringer... YOU ROCK!!! :guitar: you are my Sandle-Hat guy. love the urahara tux!

CameronCalver
November 9th, 2007, 10:07 AM
Thanks storm bringer worked a treat but one thing

Iv set up users on the server Cam,Robyn,Laura,Daniel etc i would like it so that i could make a folder on the share called Cam for example and then everyone would be able to see that folder but they would not be able to access it, only cam could access it. How would go about doing this?

arcole
November 10th, 2007, 06:42 PM
Did you find any solution anywhere for this problem. I ask because I have the same problem.

From my Kubuntu machine I can access the shares on the Windows machines, but not vice versa. :(

have been having this same issue with 7.10. this guide worked great with 7.04 but with an install of 7.10 something gets screwed up. but after about 3 reinstalls i think i may have a fix for some people. it worked for me.

when you use the "server install" dont let the cd install samba when asked install it after the os install is done. have no clue what if anything this helps with but it worked for me.

Smerky
November 13th, 2007, 04:16 AM
Hello,

So I'm really new to linux and especially linux servers and I'm also lost. I've been trying to set up a samba server( Ubuntu 7.10) on a desktop that I have here on my home network, which is composed of one XP desktop, a Ubuntu Virtual machine, and my linksys router.)

So far I've just flunked and I've been trying to search for a detailed guide that can help me. This guide has been pretty excellent but I've ran into a few problems at the very beginning.

I got to the point where I installed samba and then I stopped it. After that the nest couples of steps goes as follows:



root@hoab:~# mv /etc/samba/smb.conf /etc/samba/smb.conf.template
root@hoab:~# touch /etc/samba/smb.conf
root@hoab:~# gedit /etc/samba/smb.conf
cannot open display:
Run 'gedit --help' to see a full list of available command line options.

At that point I had no idea what to do. So I tried looking at some other help files and such and haven't got any where. I also tried installing the gedit (The first time it said it wasn't installed), smbclient, samba-common, and smbfs.

Would someone mind helping me? I'd really appreciate it.

arcole
November 15th, 2007, 05:08 AM
Hello,

So I'm really new to linux and especially linux servers and I'm also lost. I've been trying to set up a samba server( Ubuntu 7.10) on a desktop that I have here on my home network, which is composed of one XP desktop, a Ubuntu Virtual machine, and my linksys router.)

So far I've just flunked and I've been trying to search for a detailed guide that can help me. This guide has been pretty excellent but I've ran into a few problems at the very beginning.

I got to the point where I installed samba and then I stopped it. After that the nest couples of steps goes as follows:



root@hoab:~# mv /etc/samba/smb.conf /etc/samba/smb.conf.template
root@hoab:~# touch /etc/samba/smb.conf
root@hoab:~# gedit /etc/samba/smb.conf
cannot open display:
Run 'gedit --help' to see a full list of available command line options.

At that point I had no idea what to do. So I tried looking at some other help files and such and haven't got any where. I also tried installing the gedit (The first time it said it wasn't installed), smbclient, samba-common, and smbfs.

Would someone mind helping me? I'd really appreciate it.

easy change "gedit" to "nano"

artemen
November 16th, 2007, 02:22 AM
I AM COMPLETELY new with samba and linux itself, know some staff about networking and that's about it. Did you mean jast "copy paste whatever in the <code> boxes"? Please, forgive my ignorance, but can we change YOUR_USERNAME in the code before typing it in? thanks a lot for this post.

Troberg
November 16th, 2007, 05:57 AM
Did you mean jast "copy paste whatever in the <code> boxes"? Please, forgive my ignorance, but can we change YOUR_USERNAME in the code before typing it in?

Yes and yes.

cor2y
November 30th, 2007, 08:42 PM
Can someone help me I can't access the share folder.
Its listed in My Network places on the windows side but it says that there is no permission to view.