getXXbyYY
by Chris Kranz on Feb.06, 2009, under Undocumented Commands
This is quite useful for extracting information from the filer.
usage: getXXbyYY <sub-command> <name>
Where sub-command is one of
gethostbyname_r
gethostbyaddr_r
netgrp
getspwbyname_r
getpwbyname_r
getpwbyuid_r
getgrbyname
getgrbygid
getgrlist
So we can pull out the root users information, including the encrypted password
filer1*> getXXbyYY getpwbyname_r root
pw_name = root
pw_passwd = _J9..9aTB5SBQOW.uu96
pw_uid = 0, pw_gid = 1
pw_gecos =
pw_dir = /
pw_shell =
Supplemental:
These tools are actually very useful, and on further reading and applications I’ve realise more where they can be used. Remember the search order is defined by “/etc/nsswitch.conf”
To perform DNS lookups, similar to what you might want to achieve with nslookup, you can use this tool…
filer01> getXXbyYY gethostbyname_r b2net-dc
name: b2net-dc.b2net.lan
aliases:
addresses: 10.0.0.5 10.0.1.5 10.0.30.5
Or reverse lookups to make sure DNS works properly…
filer01*> getXXbyYY gethostbyaddr_r 10.0.0.149
name: b2net-exch03.b2net.lan
aliases:
addresses: 10.0.0.149
If you have LDAP configured and working, you can also use this tool to perform LDAP lookups.










































