Samba, PAM and MySql auth
Hi to all again, this is my second problem.
I've installed a Linux Ubuntu Server in my company and I've stored in separate folders the files of my emplojees that, of course, don't have a user in that machine.
The list of the users are in a MySql folder and the password are crypted with the PASSWORD() option of mysql.
I've activated with success the ftp service using PAM authentication and I would like do the same with samba.
I've tryed one month reading a lot of HowTo, posts, linux-guru, etc. but I'm still having the same result: no way!
My goal will be to share all the folders but I want every user could log only in his personal folder.
I'm really stressed about that! :-)
Could anyone help me please with some working examples?
Thanks anyway for interesting. Enrico
How many users is this for? How do they authenticate now? There is a mysqlsam backend mentioned in "Samba-3 Official HOWTO & Reference Guide" but no further information on it that I could find in the book. I'd recommend that book and "Samba-3 by Example". They are available in the book stores, or you can download the pdfs from the Samba website. Also, most distro's have a `samba-doc' package that has these two books.
I don't think you are approaching this the correct way. There are different password backends for samba. They contain more information than the the username and encrypted password. You can use the smbpasswd command to add users & passwords. There is also a tdbsam database which you might want to use for over 20 users. Or you can use ldap or AD to handle authentication. The two books I mentioned have step by step instructions, including setting up the directories to share, and their permissions.
A samba user needs to be a Linux user as well. A user will have a UID on Linux as well. That is what the Linux permission system is based on.
Take a look at these two share definitions:
The `users' share will show up as `users' in explorer. When a user opens it, they will see a share by all of the users and will need to locate their own share and open it. Access to the other shares depends on the permissions of each users home directory.
I have a NAS of Buffalo Technology that does exactly that. I've searched the specifications and I've seen that it uses linux inside for authentications. I can use it as FTP and as Samba with just one declaration of user and passw. So I would to recreate the same condition on mu ubuntu server.
This is my actually samba.conf file if could be useful (now I've shared all the folders but that situation doesn't make me really happy)..
why dont u do that
browseable = yes
read only = no
path = /home/%u
comment = Cartella PRIVATA di %u
U can use the username stored in the %u variable so set
the right path of the share for each logged user
using only on share declaration.
I stopped by here by chance!
|All times are GMT -5. The time now is 12:12 PM.|