1830929 Members
2257 Online
110017 Solutions
New Discussion

Re: samba access

 
ThanseerK
Occasional Contributor

samba access

Hi,

We are using samba to access the shares in our hp ux 11.23 box. We are using username.map file for providing access to the users. the entry for this in smb.conf is as follows
usermap = /etc/opt/samba/username.map

and the contents in username.map file is
#cat /etc/opt/samba/username.map
rldb = user1 user2 user3 user5 and so on

Does any one know how to provide read only access to the users using this way.
2 REPLIES 2
Steven E. Protter
Exalted Contributor

Re: samba access

Shalom,

Access control is in the share section of smb.conf

From the man page:

Each section in the configuration file (except for the [global]
section) describes a shared resource (known as a ``share''). The
section name is the name of the shared resource and the parameters
within the section define the shares attributes.

There are three special sections, [global], [homes] and [printers],
which are described under special sections. The following notes apply
to ordinary section descriptions.

A share consists of a directory to which access is being given plus a
description of the access rights which are granted to the user of the
service. Some housekeeping options are also specifiable.

Sections are either file share services (used by the client as an
extension of their native file systems) or printable services (used by
the client to access print services on the host running the server).

There are examples in there. Take a look.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Ivan Ferreira
Honored Contributor

Re: samba access

In your share definition you should add:

[sharename]
read only = yes

You can also specify
[sharename]
valid users = rldb

To allow only access to the rldb user.

You have to reload/restart the service.

Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?