Page 1 of 3 123 LastLast
Results 1 to 10 of 29

Thread: Samba does not create /etc/samba

  1. #1
    Join Date
    Jun 2009
    Location
    Montreal, Canada
    Beans
    18
    Distro
    Ubuntu 12.04 Precise Pangolin

    Samba does not create /etc/samba

    I am running Ubuntu server 12.04.03 and When I install Samba with the following command:

    platour@tech:/$ sudo apt-get install samba

    and try to edit /etc/samba/smb.conf to add my own shares, there is no smb.conf and not even a samba directory under /etc, so I looked more closely to the installation info displayed after the command above and here is what I got ( I put in red what flashed me):

    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Suggested packages:
    openbsd-inetd inet-superserver smbldap-tools ctdb
    The following NEW packages will be installed:
    samba
    0 upgraded, 1 newly installed, 0 to remove and 3 not upgraded.
    Need to get 0 B/8,040 kB of archives.
    After this operation, 23.4 MB of additional disk space will be used.
    Preconfiguring packages ...
    Selecting previously unselected package samba.
    (Reading database ... 62050 files and directories currently installed.)
    Unpacking samba (from .../samba_2%3a3.6.3-2ubuntu2.9_amd64.deb) ...
    Processing triggers for man-db ...
    Processing triggers for ureadahead ...
    Processing triggers for ufw ...
    Setting up samba (2:3.6.3-2ubuntu2.9) ...
    Generating /etc/default/samba...
    update-alternatives: using /usr/bin/smbstatus.samba3 to provide /usr/bin/smbstatus (smbstatus) in auto mode.
    smbd start/running, process 3397
    nmbd stop/pre-start, process 3432

    Then I tried smbstatus.samba3 and the result is:
    platour@tech:/etc/samba$ sudo /usr/bin/smbstatus.samba3
    Can't load /etc/samba/smb.conf - run testparm to debug it

    I ran testparm and:

    platour@tech:/etc/samba$ testparm
    Load smb config files from /etc/samba/smb.conf
    rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
    params.c:OpenConfFile() - Unable to open configuration file "/etc/samba/smb.conf":
    No such file or directory
    Error loading services.

    I deinstalled and reinstalled samba but always got the same result. Any idea ?

    Thanks and Regards,

    Patrick Latour

  2. #2
    Join Date
    Mar 2011
    Location
    Pizza Hut
    Beans
    1,206
    Distro
    Kubuntu 13.10 Saucy Salamander

    Re: Samba does not create /etc/samba

    I believe what you're looking for is /usr/share/samba.
    Ubuntu user #35115 - Linux user #555707 - My Ubuntu Wik page
    Join the Ubuntu Forums' IRC room (#ubuntuforums on irc.freenode.net)!

  3. #3
    Join Date
    May 2008
    Location
    SoCal
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Samba does not create /etc/samba

    Quote Originally Posted by Patrick Latour View Post
    I am running Ubuntu server 12.04.03 and When I install Samba with the following command:

    platour@tech:/$ sudo apt-get install samba

    and try to edit /etc/samba/smb.conf to add my own shares, there is no smb.conf and not even a samba directory under /etc, ...

    [Later ???] I deinstalled and reinstalled samba but always got the same result. Any idea ?

    Thanks and Regards,

    Patrick Latour
    The /etc/samba structure is not recreated when you remove it. I believe (but don't actually know for sure) that if you purge samba and then reinstall you will have the /etc/samba structure and the 2 files that are there by default. The other file is gdbcommands. It's for Samba debuging. None of the 20+ plus installs i have performed of samba (v3.6) have failed to construct these files and the directory structure.

    That being said, @dniMretsaM is correct. There is a copy of the smb.conf file at /usr/share/samba. One caveat however. You need to change this line
    Code:
       encrypt passwords = no
    ... to this
    Code:
       encrypt passwords = yes
    Of course you will need to create the /etc/samba directory if it is not there. The ownership is root:root and the permissions are 755.
    -BAB1

  4. #4
    Join Date
    Jun 2009
    Location
    Montreal, Canada
    Beans
    18
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Samba does not create /etc/samba

    Ok, thanks. I copied from /usr/share/samba and changed the encrypt passwords = no for yes. I have a first share named [shared] that is open to anyone (guest ok = yes). I can connect to it from Windows without any problem. I have another share named [management], guest ok = no. in my smbusers i placed my username platour = platour sync passwords is at yes and I installed libpam-smbpass to keep my password in sync. When I try to connect to management it asks for a username and a password, I enter platour with my linux password but it is always refusing the access. What the owner of management directory (/srv/samba/management) should be ? nobody:nogroup like the open shared ?, or maybe something like platour:management (I created a group, so other users from that group could access the shared). Sorry for the dumb questions but it is one of my first try at Samba. Thanks again.

  5. #5
    Join Date
    Mar 2006
    Location
    Williams Lake
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Samba does not create /etc/samba

    Have you set a samba password by running:

    Code:
    sudo smbpasswd -a

  6. #6
    Join Date
    Jun 2009
    Location
    Montreal, Canada
    Beans
    18
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Samba does not create /etc/samba

    Yes I did. I runned: sudo smbpasswd -a platour
    Here is my share definition:
    [management]
    comment = STE management drive
    path = /srv/samba/management
    browsable = yes
    guest ok = no
    valid users = platour
    read only = no
    create mask = 0755

    My smbusers:
    platour = platour

    platour is a valid user on my linux server and he is member of a group named management

    My owner for /srv/samba/management is platour:management

    I know that I am doing something wrong somewhere, just need to find where

    Thanks for your help

  7. #7
    Join Date
    May 2008
    Location
    SoCal
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Samba does not create /etc/samba

    Quote Originally Posted by Patrick Latour View Post
    Yes I did. I runned: sudo smbpasswd -a platour
    Here is my share definition:
    [management]
    comment = STE management drive
    path = /srv/samba/management
    browsable = yes
    guest ok = no
    valid users = platour
    read only = no
    create mask = 0755

    My smbusers:
    platour = platour

    platour is a valid user on my linux server and he is member of a group named management

    My owner for /srv/samba/management is platour:management

    I know that I am doing something wrong somewhere, just need to find where

    Thanks for your help
    Let's diagnose this a little. What OS is the client using Ubuntu or Windows? From the Ubuntu server Post the output of these commands
    Code:
    ls -ld /srv
    ls -ld /srv/samba
    ls-ld /srv/samba/management
    
    smbclient d3 -L ////<SERVERNAME>
    ...where <SERVERNAME> is the name you have set for the Ubuntu server. If this was my server it would look like this: smbclient -d3 -L ////malibu

    Post the entire smb.conf file that you are using now.
    -BAB1

  8. #8
    Join Date
    Jun 2009
    Location
    Montreal, Canada
    Beans
    18
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Samba does not create /etc/samba

    Thanks BAB1, here are the info you requested:
    $: ls -ld /srv
    drwxr-xr-x 4 root root 4096 Mar 14 16:55 /srv

    $: ls -ld /srv/samba
    drwxr-xr-x 5 root root 4096 Mar 14 16:55 /srv/samba

    $: ls -ld /srv/samba/management
    drwxrw-rw- 2 platour management 4096 Mar 14 16:55 /srv/samba/management

    The smb.conf will follow in few minutes...

    Thanks to you all...

  9. #9
    Join Date
    May 2008
    Location
    SoCal
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Samba does not create /etc/samba

    Quote Originally Posted by Patrick Latour View Post
    Thanks BAB1, here are the info you requested:
    $: ls -ld /srv
    drwxr-xr-x 4 root root 4096 Mar 14 16:55 /srv

    $: ls -ld /srv/samba
    drwxr-xr-x 5 root root 4096 Mar 14 16:55 /srv/samba

    $: ls -ld /srv/samba/management
    drwxrw-rw- 2 platour management 4096 Mar 14 16:55 /srv/samba/management

    The smb.conf will follow in few minutes...

    Thanks to you all...
    Don't forget this
    Code:
    smbclient d3 -L ////<SERVERNAME>
    -BAB1

  10. #10
    Join Date
    Jun 2009
    Location
    Montreal, Canada
    Beans
    18
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Samba does not create /etc/samba

    Ok, for that command I got an error:

    smbclient d3 -L ////tech

    d3: Not enough '\' characters in service
    Usage: smbclient [-?EgBVNkPeC] [-?|--help] [--usage]
    [-R|--name-resolve=NAME-RESOLVE-ORDER] [-M|--message=HOST]
    [-I|--ip-address=IP] [-E|--stderr] [-L|--list=HOST]
    [-m|--max-protocol=LEVEL] [-T|--tar=<c|x>IXFqgbNan]
    [-D|--directory=DIR] [-c|--command=STRING] [-b|--send-buffer=BYTES]
    [-p|--port=PORT] [-g|--grepable] [-B|--browse]
    [-d|--debuglevel=DEBUGLEVEL] [-s|--configfile=CONFIGFILE]
    [-l|--log-basename=LOGFILEBASE] [-V|--version] [--option=name=value]
    [-O|--socket-options=SOCKETOPTIONS] [-n|--netbiosname=NETBIOSNAME]
    [-W|--workgroup=WORKGROUP] [-i|--scope=SCOPE] [-U|--user=USERNAME]
    [-N|--no-pass] [-k|--kerberos] [-A|--authentication-file=FILE]
    [-S|--signing=on|off|required] [-P|--machine-pass] [-e|--encrypt]
    [-C|--use-ccache] service <password>

Page 1 of 3 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •