1

I have been trying to configure samba for a while now.
as I had completely broken my setup, i followed the post on this site to completely reset samba to the defaults. (see How do I completely reset Samba to the shipped defaults?)

Now I can not reinstall samba; it always complains about the fact that /etc/samba doesn't exist.

  • Can I just recreate the folder/file?
  • am I missing some files if Irecreate /etc/samba/smb.conf?
  • is there a template or what is the standard content of the smb.conf file?
Brtrnd
  • 175
  • Can you post the exact error message when you try to install samba? You can probably just sudo mkdir /etc/samba – Panther Apr 03 '13 at 18:30
  • the installation goes fine, it's "using" samba that isn't fine: http://pastebin.com/MARj4Z5X – Brtrnd Apr 04 '13 at 17:12

1 Answers1

1

I would do this...

sudo rm samba.conf - remove the file

sudo touch samba.conf - make the file (empty)

sudo nano samba.conf - edit the file

heres a default ..

[global]
    ; General server settings
    netbios name = YOUR_HOSTNAME
    server string =
    workgroup = YOUR_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 = 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 = /media/samba/
    browseable = yes
    read only = no
    guest ok = no
    create mask = 0644
    directory mask = 0755
    force user = YOUR_USERNAME
    force group = YOUR_USERGROUP
wlraider70
  • 1,683
  • That did solve my two problems; samba works again and I can reach my computer by hostname. Thank you – Brtrnd Apr 04 '13 at 17:27