Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: Samba Problem

  1. #1

    Default Samba Problem

    Hi

    I am new to Samba, somehow so far I managed to create a public share. Now I need to create another share but this time it requires a username and password.

    I can't understand the process of creating such a share. I am trying to create a samba user account using smbpasswd -a but it does not want to work. The following is copied from the terminal window.

    linux-8cgh:/home/administrator # smbpasswd -a test
    New SMB password:
    Retype new SMB password:
    Failed to add entry for user test.
    You have mail in /var/mail/root


    I appreciate any help as I'm feeling like a hopeless case

    Thanks!!

  2. #2
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    15,649

    Default Re: Samba Problem

    Do you have a user called test setup on the machine?

  3. #3

    Default Re: Samba Problem

    Hi, Thanks for your prompt reply. I have to create a system user account and use it for the samba user account? I'm going to try it now.

    Thanks.

  4. #4
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    15,649

    Default Re: Samba Problem

    To be honest it is a guess. I never have tried it.

    here is a good starter on Samba

    Samba and Suse: HowTo Set up an openSUSE-Windows Home Office LAN/Network. Versions 11.x

  5. #5

    Default Re: Samba Problem

    The user account works. Is it possible to create this password protected share using the tool available in Yast or it works better when configured by editing the configuration file?

  6. #6
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    15,649

    Default Re: Samba Problem

    Well personally and only working with small home P2P I have found edit the config file manually much easier the GUI tends to put extraneous stuff in. I always fallow the instruction on the site I referenced above. It makes the concepts much easier to understand. Take 1/2 hour and read it you will not regret it.

  7. #7
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: Samba Problem

    Quote Originally Posted by hkdesign View Post
    Hi, Thanks for your prompt reply. I have to create a system user account and use it for the samba user account? I'm going to try it now.

    Thanks.
    A Samba user account must also be a Linux user account first. Not a system user account, just a normal user account will do.

  8. #8

    Default Re: Samba Problem

    Hi thanks for the link I really found it useful! However I still have one problem I wish to solve. I created the share and when I try to connect to the share I'm being asked to authenticate myself (so far so good). However when I enter the account details it does not connect.

    The following are my main two shares

    [managment]
    path = /home/administrator/Documents/file_structure/management
    read only = no
    access = kaiser
    force user = kaiser

    [ordnerstruktur]
    path = /home/administrator/Documents/file_structure/ordnerstruktur
    read only = no
    guest ok = yes
    force user = administrator



    I have 2 shares: ordnerstruktur works (public), however management does not work. Both are situated on the adminsitrator account as you can see from the path. I want the user kaiser to be the only one able to access managament. Any help would be appreciated. I will continue checking that link and try some other things maybe I manage to solve this. Thanks again

  9. #9
    Join Date
    Mar 2008
    Location
    Oz
    Posts
    11,727
    Blog Entries
    2

    Default Re: Samba Problem

    Regarding this share:
    [managment]
    path = /home/administrator/Documents/file_structure/management
    read only = no
    access = kaiser
    force user = kaiser
    There are several ways to do this such that only kaiser can access the share, I'll show one, here are the steps:
    1. change the ownership of the directory "management" and its contents over to kaiser with this command:
      Code:
      sudo chown -R kaiser:users /home/administrator/Documents/file_structure/management
    2. change this line
      Code:
      access = kaiser
      to this
      Code:
      valid users = kaiser
    3. add kaiser to the samba user database with this command
      Code:
      sudo smbpasswd -a kaiser


    There is an article on structuring shares for various purposes. Might be useful:
    Samba Server and Suse / openSUSE: HowTo Configure a Professional File Server on a SOHO LAN
    Leap 42.3 & 15.1(Beta) &KDE
    FYIs from the days of yore

  10. #10

    Default Re: Samba Problem

    Hi swerdna! Thanks for your tips I have followed your steps however I think that the ownership has not changed to kaiser as when I go on the folder with dolphin and check the permissions under owner. administrator is being listed.

Page 1 of 2 12 LastLast

Posting Permissions

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