Bash script - for rsync to backup file server running samba.

Sean Roe sean at azbiz.net
Fri Jan 6 10:46:32 MST 2012


you could use smbstatus and grep out the users.

Sean

On Fri, Jan 6, 2012 at 1:11 AM, James Dugger <james.dugger at gmail.com> wrote:

> Does anyone know if a Linux server can identify windows users connected to
> the server through a Samba share, where Samba has not been configured as a
> domain controller (i.e. samba is resolving user accounts with smbpasswd
> only).  Are the windows users always synced with a UNIX user?
>
> I am writing a bash script for a rather peculiar backup scenario where
> laptops running Windows 7 are backed up to a server when/if they are
> connected to the LAN using rsync.  There is no local DNS server or domain
> controller installed in the LAN (other than the router which is only
> configured for DHCP service).  I had planned to use the following to
> generate a list of connected users:
>
>     who | cut -d' ' -f1 | sort | uniq > /srv/backup/user.lst
>
> This list would then be read into a bash array and used to iterate the
> backup script for those known connected users.  However, If I can't verify
> Windows users that are connected is there a clean non-taxing way to test
> for the mac addresses of the connected laptops  over the LAN?  I know that
> using:
>
>     nmap -sP <ip address range>
>
>  will return the mac address along with other info, but I don't know if
> there is a way to get a clean mac address only list from scan.
>
> Any thoughts would be greatly appreciated.
>
> Thanks
>
>
> --
> James
>
>
>
> ---------------------------------------------------
> PLUG-discuss mailing list - PLUG-discuss at lists.plug.phoenix.az.us
> To subscribe, unsubscribe, or to change your mail settings:
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.PLUG.phoenix.az.us/pipermail/plug-discuss/attachments/20120106/15ca7660/attachment.html>


More information about the PLUG-discuss mailing list