/etc/passwd or from OpenLDAP ... or whatever source you choose) and only authenticate Samba access against AD.smbmnt and smbumount:chmod u+s `which smbmnt` `which smbumount`smbmnt with smbmount! You'll get a warning upon use if you set the setuid for the latter.smbstatus command to get a list of current Samba connections (processes, shares and locks). However if you're looking for the user who has a specific file open, then first you've to look for a lock in the lock list (smbstatus --locks), then you've to look up the username for the given PID in the process list (smbstatus --processes). I've made a script that uses awk to process the output of smbstatus and print the name of the user who keeps opened the file specified in the parameters.
I thought that to restrict users I just had to set "read list" to an empty value and "write list" to a set of users+groups. However these do not work as I thought.
Even if you allow authentication and access of the "root" user to a service, it will not create new files/directories with root's credential, but use the ownership of the parent directory instead. You can set "force group", "inherit owner" or whatever ... if you authenticate to the Samba server as "root" and create a file or a directory, then it will inherit the ownership (both user and group) of the parent directory. The only was to create root-owned files while authenticated as "root" is if you do this within a directory that itself is owned by root. 
"public = yes" (or the "guest ok = yes"), the "guest account = <account>" and the "read list = user1, user2, group1" config parameters in smb.conf. However this works only with Windows 2000 and recent versions of Windows clients, they can successfully access the share without a valid username or password.
Recent comments
2 days 8 hours ago
2 days 8 hours ago
4 days 13 hours ago
1 week 1 day ago
1 week 2 days ago
1 week 3 days ago
1 week 3 days ago
1 week 3 days ago
1 week 5 days ago
2 weeks 14 hours ago