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

James Dugger james.dugger at gmail.com
Fri Jan 6 01:11:31 MST 2012


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.PLUG.phoenix.az.us/pipermail/plug-discuss/attachments/20120106/b72de748/attachment.html>


More information about the PLUG-discuss mailing list