Hint: Extract IP's of Windows Clients from sambalog
Hi there,
as I didn't find my win machines in the leases lists (at least not with their
given host names) I now used this command line in order to get a list from
samba logs. To understand it entirely, you must know, that our clients' names
(for windows) start with the name of the room the clients are in, in this
case G100.
/var/log/samba# grep -i g100 /var/log/samba/log.g100-* \
| grep init | cut -d\ -f3-4 | sort | uniq
The result looks like:
g100-10 (10.0.2.253)
g100-11 (10.0.2.237)
g100-12 (10.0.2.252)
g100-13 (10.0.3.232)
g100-13 (10.0.3.242)
g100-14 (10.0.2.243)
g100-15 (10.0.3.241)
g100-16 (10.0.2.244)
g100-17 (10.0.2.245)
g100-18 (10.0.2.247)
g100-19 (10.0.2.249)
To get a sorted list of IPs, use cut -d\ -f4 instead of 3-4!
grep -i g100 /var/log/samba/log.g100-* | \
grep init |cut -d\ -f4 |sort |uniq |tr "()" " "
Have Fun
Ralf
Reply to: