Samba Users

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.
LVL 28
Who is Participating?
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
strickddAuthor Commented:
Why would I have to use a registry hack on Windows?  Isn't it the Samba configuration script's job to emulate Windows handshakes?
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.
Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

The following site should give you a good idea on what needs to be done:
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

strickddAuthor Commented:
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.
view the samba log files
Use "smbstatus" command to see the samba usage status.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.