Dane Shea
2007-Dec-02 08:04 UTC
[Samba] Making a public drive where admin has write access
Hello I am trying to make a public drive where an admin has write access but other users only have read access. I want to be able to mount the drive automatically for the users and admin but I want the admin to automount with write access using a batch file. This is what my share looks like tell me if it is right. [public] comment = Public Shared Folder path = /home/public write list = DShea create mask = 0775 guest ok = Yes Then the batch file looks like this: NET USE J: \\192.168.1.109\public <file:///\\192.168.1.109\public> /USER:daneshea.com\DShea dane For some reason it mounts it but not with write access. I can't figure out why. Thanks in advance
Chris Smith
2007-Dec-02 15:23 UTC
[Samba] Making a public drive where admin has write access
On Sunday 02 December 2007, Dane Shea wrote:> [public] > comment = Public Shared Folder > path = /home/public > write list = DShea > create mask = 0775 > guest ok = YesIt's good to distinguish between other authenticated users and guests. Authenticated users may or may not have admin rights, but they are not guests. Guests are users that are not authenticated at all - some stranger walking in off the street with a laptop, plugging into your network could access a guest share. First set the share up as read only, then give write privileges, but also decide if you really want guest access. Best to have an admin group that the admin users belong to, then you can have some more flexibility. Plus you may need to qualify the name with the domain. Of course, even more flexible is a group that has write access that the admins belong to as well. That way you can easily give others write access by adding them to the write group with adding them to the admin group. Maybe: [public] comment = Public Shared Folder path = /home/public read only = yes write list = +"daneshea.com\admin" create mask = 0775 guest ok = no> NET USE J: \\192.168.1.109\public <file:///\\192.168.1.109\public> > /USER:daneshea.com\DShea danePlain old: net use j: \\<servername>\public should work just fine. The same script for everyone. If you're logged on as an admin (if dshea is in the admin group, and you log on as dshea, as an example) you will have write privileges, if you're not in the admin group you wont. -- Chris