add a user into samba windows file sharing.

Discussion in 'General Server' started by james_ptg, May 14, 2013.

  1. james_ptg

    james_ptg New Member

    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    0
    Hi people,

    I'm actually testing SoGo ZEG

    So it's based on

    Ubuntu 12.04 With Webmin as interface

    So I have enabled Samba Windows File Sharing

    now I try to create a account to let a windows user have acces to the sharing. but I don't understand how create this account ?

    I have follow this guide
    Samba Configuration:

    but I'm stuck at the point 22
    so where can I type this command
    Code:
    “smbpasswd” username
    I have try inside the webmin Command Shell but with no succes
    [​IMG]

    James.

  2. arochester

    arochester Well-Known Member

    Messages:
    896
    Likes Received:
    290
    Trophy Points:
    63
    Have you put "“smbpasswd” username" here because you do not want to show the username?

    In my case it would be: “smbpasswd” alan

    "Type in: “smbpasswd” username where username is a valid user on your samba server."

    At this point, experimentation needed, I am not sure about the quote marks "". If the distro is based on Ubuntu I would also wonder about sudo.
  3. james_ptg

    james_ptg New Member

    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    0
    Thank arochester,

    so trough the web interface (webmin) with the command shell panel I have put this ->

    and i have as a return
    I have success to login locally to this SoGo machine ->
    [​IMG]

    but he tell me that command cannot be found.
  4. sivashankar

    sivashankar New Member

    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    For samba sharing we should have the same user name in linux and window AD side

    create samba user and make sure smb user and linux user should same
    smbpasswd -a username
    pdbedit -l --> to show samba users
    testparm - to check if any errors
    restart the smb service

    Go to windows servers and go to network and give the ip
  5. MikeyD

    MikeyD Active Member

    Messages:
    232
    Likes Received:
    113
    Trophy Points:
    43
    The main problem is the command isn't the whole word password, just passwd. You also don't need the quotes although it should still work

    sivashankar is right as general a rule of thumb you want to make a user on the system itself first (or your user if you're doing that) and then use smbpasswd with -a to relate the samba password to the actual system user.

    So if your user is "test" and they aren't in the system:

    useradd -m -k test (look at the useradd man page for all options)
    passwd test (to set the system password)
    smbpasswd -a test (to set the samba password)


    I was too lazy to look at that link, but make sure you have a share created in smb.conf and the user (or their group) is added to the valid users column.

    This is one of my shares on my home server:

    Code:
    [Mike]
            comment = Mike Home Directory
            path = /home/mike
            browseable = yes
            writable = yes
            guest ok = no
            read only = no
            valid users = @mdehart
    Last edited: Aug 26, 2014

Share This Page