[Samba] Single shared directory, with a universal password

Brian Wiese bwiese at cotse.com
Wed Mar 26 16:13:43 GMT 2003


On 17 Mar 2003 12:07:39 +1100
Andrew Bartlett <abartlet at samba.org> wrote:

|On Mon, 2003-03-17 at 11:37, indy at SDF.LONESTAR.ORG wrote:
|> Hello,
|> 
|> I am using Samba "Version 2.2.3a-12 for Debian" on a Debian 3.0 system.
|> I have looked at lots of Samba documentation and have not been able to
|> find anything explaining what I need. I want to create a single
|> directory on my Samba server that is ok for any user (e.g. 'guest ok =
|> yes'), but is password protected. Meaning, I want a share that any user
|> can access as long as they have the password to that specific
|> directory. I haven't seen how to do this anywhere, so any assistance
|> that you could offer would be most appreciative. Thanks a lot!
|
|Set 'security=share' on the server, and create an account in smbpasswd
|for a new user 'share_user' (or whatever you like to call it).
|
|Then put 'user = share_user' and 'valid users = share_user' in the
|declaration for that share. 

Might also want to add "force user = share_user"
>From 'man smb.conf'...
       force user (S)
              This  specifies  a  UNIX  user  name  that  will be
              assigned as the default user for all users connect­
              ing  to  this  service.  This is useful for sharing
              files. You should also use it carefully as using it
              incorrectly can cause security problems.

              This  user name only gets used once a connection is
              established.  Thus clients still need to connect as
              a valid user and supply a valid password. Once con­
              nected, all file operations will  be  performed  as
              the  "forced  user",  no  matter  what username the
              client connected as. This can be very useful.

|This gets you pretty close to the 'share level' password on Win9X.  Not
|quite (because we map to unix users) but pretty close.
|
|Note that setting 'security=share' will affect other shares on the
|server, so you might want to look into a %L include to host this on a
|separate virtual hostname.
|
|Andrew Bartlett
|
|-- 
|Andrew Bartlett                                 abartlet at pcug.org.au
|Manager, Authentication Subsystems, Samba Team  abartlet at samba.org
|Student Network Administrator, Hawker College   abartlet at hawkerc.net
|http://samba.org     http://build.samba.org     http://hawkerc.net
|


  Brian Wiese | bwiese at cotse.com | aim: unolinuxguru
------------------------------------------------------
  GnuPG/PGP key 0xF3220030 | "FREEDOM!" - Braveheart 
------------------------------------------------------  
This is not about Napster or DVDs. It's about your Freedom.
  I'll see your DMCA and raise you a First Amendment.
              http://www.anti-dmca.org


More information about the samba mailing list