1833758 Members
2643 Online
110063 Solutions
New Discussion

Samba access report

 
Luis Toro
Regular Advisor

Samba access report

Hi,
Is there a samba command that would give me the access that a particular UNIX userid has ? I know the information is in the smb.conf file, but I need to develop a report that will scan the accounts in /etc/passwd, check for samba access (ie., grep username.map), then list the directories (and access level, if possible) that the userid(s) has via samba. Note that the report is required by non-admins, so simply printing the smb.conf file is not enough. I know its scriptable, but before I start doing that, I figure I'd ask. Note that access in smb.conf is defined at both the userid and group level for some directories.
Thanks
3 REPLIES 3
Steven E. Protter
Exalted Contributor

Re: Samba access report

The smb.conf file has a log file defined.

Some information is stored in this log file.

You can create an activity report, at least a bare bones one by processing that log file.

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
Luis Toro
Regular Advisor

Re: Samba access report

Thanks for the reply, but I'm not looking to report on activity, but rather on access. Whether or not a userid has accessed a certain samba share does not matter; I need to report on what a userid can access.
Steven E. Protter
Exalted Contributor

Re: Samba access report

I don't believe the functionality you request is built into samba.

I may be wrong about that. This is quite specific and might better be directed to http://www.samba.org

If your system is trusted, you might be able to extract the information from the audit reports.

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