Samba Users

Posted on 2006-06-06
Last Modified: 2010-03-18
I am new to setting up Samba shares on Linux but I have a limited experience with Linux. I want to set up two users (administrator = root) and (roomate = limited account) both with passwords that have access on different levels on the two shares I have setup.

I have the drives I want shared already configured in Samba as follows

[share1] path = /share1 available = yes browseable = yes public = yes writable = yes
[share2] path = /share2 available = yes browseable = yes public = yes writable = yes

Currently when you try to connect to the server from Windows XP it asks for credentials and no matter what I supply it says invalid.  I would like to make a roomate username with only read and list access to the shares, I also want to create an administrator account with full access.

If possible I would like to be able to view who is connected to what shares and be able to kick them (like Windows 2003's file server admin console) but thats not important if its not easy to setup.
Question by:strickdd
    LVL 2

    Accepted Solution

    1st you have to do the reg hack on the xp machine





    Use the group called users for the restriction, and add yourself to the root and wheel group.

    Then for the shares

            comment = Shared stuff for all
            path = /share1
            valid users = could be their names, ip #, ip range
            read list = user,guest,ftp
            read only = No

    add more comments if thsi does not work
    LVL 28

    Author Comment

    Why would I have to use a registry hack on Windows?  Isn't it the Samba configuration script's job to emulate Windows handshakes?
    LVL 57

    Assisted Solution

    Have you setup the userid's "Administrator" and "roomate" and passwords in the samba userid and password files?  Samba does not use the Linux userid's and passwords.
    LVL 87

    Assisted Solution

    The following site should give you a good idea on what needs to be done:
    LVL 2

    Expert Comment

    You also need to add the machine

    To add the user's machine to the trust domain a special account has to be made on the Samba box to allow logins by this machine.

    adduser -n -g <group> -c <descrip> -d /dev/null -s /bin/false <machine name>$
    smbpasswd -a -m <machine name>

    if the machine name were pc800:
    adduser -n -g <group> -c <descrip> -d /dev/null -s /bin/false pc800$
    smbpasswd -a -m pc800

    LVL 28

    Author Comment

    I have it working now with the two users I want to have access on the share with the following setup

    # Global Parameters

    workgroup = home
    netbios name = bluetwo
    encrypt passwords = yes

    read only = no
    browseable = no

    path = /priv1
    browseable = yes
    write list = user1
    valid users = user1, user2

    path = /priv2
    browseable = yes
    write list = user1
    valid users = user1, user2

    path = /Incoming
    browseable = yes
    write list = user1, user2
    valid users = user1, user2

    I can now connect and share files but I may run into problems down the road if this is setup wrong so if anyone has anything to add and can explain what it will do please help me.  Also I am still interested in monitoring the shares, if anyone has an idea on how to set that up.
    LVL 2

    Assisted Solution

    view the samba log files
    LVL 1

    Assisted Solution

    Use "smbstatus" command to see the samba usage status.


    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
    Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now