1. IMPORTANT - 11/13/2015: In light of a possible breach we have scrubbed all passwords. You will need to request a password reset through the site. Click here for more information.

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

    May 14, 2013
    Likes Received:
    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
    “smbpasswd” username
    I have try inside the webmin Command Shell but with no succes

  2. arochester

    arochester Super Moderator Staff Member

    Nov 23, 2012
    Likes Received:
    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

    May 14, 2013
    Likes Received:
    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 ->

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

    sivashankar New Member

    Aug 20, 2014
    Likes Received:
    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

    Jul 23, 2013
    Likes Received:
    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:

            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