Credentials for Discovery: Getting Access Right
Here is the fact that separates a useful discovery scan from a disappointing one. It has nothing to do with the scanner: discovery quality is credential quality. An anonymous scan — no passwords, no accounts — sees shapes: an address answered, some ports are open, probably a server of some kind. A credentialed scan sees identity: this is srv-file-01, this model, this serial number, these interfaces, this much disk. Same scanner, same network, same afternoon; the difference is entirely in what keys you handed it.
That raises the uncomfortable part. You are about to create accounts that can log into everything you own. You will store their secrets somewhere and use them from an automated system on a schedule. Done carelessly, that is a security problem wearing a productivity costume. Done right, it is boringly safe: read-only everywhere, scoped tightly, stored properly, and auditable at a glance. This guide covers both halves — what credentials unlock for discovery, and the least-privilege design that lets you sleep after granting them.
In this guide
- Why discovery needs credentials at all
- Least privilege, protocol by protocol
- Provisioning access on the devices
- Credential hygiene at scale
- Scanning safely: restriction, vantage, lockouts, audits
- Failure symptoms and their fixes
- The credential design worksheet
Why discovery needs credentials at all
Watch the difference on a single device. Point an anonymous scan at 10.0.4.20. The report reads: host up, ports 135, 445, and 3389 open — conclusion, "some Windows server." That is a shape. Now give the scanner a read-scoped Windows account and ask again. The answer includes hostname srv-file-01, a specific model of rack server, and a serial number for the warranty file. It also includes two network adapters, the operating system edition, disks and their free space, and the services running. That is an identity — the raw material of an inventory worth keeping. It is the difference between a device list and a guest list where everyone wrote "plus one."
The same contrast on a piece of network gear, in the raw. Anonymous, the scanner learns this and only this:
10.0.3.12 is up (0.0021s latency) open ports: 22, 80, 443 guess: network device or embedded web thing
Hand it a valid read-only SNMP credential and the very same address answers with a self-portrait:
sysDescr.0 = 24-Port Gigabit PoE Managed Switch sysName.0 = sw-edge-02 sysLocation.0 = HQ east closet sysUpTime.0 = 213 days, 4:12:56 ifDescr = GigabitEthernet1 ... GigabitEthernet24 entPhysicalSerialNum = FCW1234A5BC
Name, model, location, uptime, every port, and the serial number — one credential turned a mystery box into an inventory record. Multiply by every device you own and you understand why credential setup, tedious as it is, is the highest-leverage hour in any discovery project.
Each management protocol has its own kind of key and unlocks its own depth:
| Protocol | The credential | What it unlocks for discovery |
|---|---|---|
| SNMP | Community string (v1/v2c) or a v3 username with auth/privacy passphrases | Network gear identity: name, model, location, uptime, serial on many devices, and the full interface table — switches, firewalls, printers, UPSes, APs |
| WMI | A Windows domain service account | Windows depth: hostname, OS, hardware model and serial, disks, services, installed roles |
| SSH | A user account, ideally key-based | Linux facts and network-device CLI output: hostnames, hardware details, configurations on gear managed at the command line |
Without the right entry in that table, a device class simply does not get identified. The scanner is not being lazy; it knocked, and nobody was obligated to answer. (For what discovery does once the door opens, see how auto-discovery actually works — credentials power its whole identity pass.)
Least privilege, protocol by protocol
The universal rule first. Every per-protocol detail is just this rule wearing different clothes: a discovery account may read everything and change nothing. Discovery asks questions; it never needs to answer any, configure any, or fix any. Any privilege beyond read is pure downside — unused in the best case, a loaded weapon in the worst. Picture the worst concretely once, so the rule sticks. A leaked read credential lets an attacker learn your network, which is bad. A leaked write credential lets them reconfigure it, which is a very different Tuesday. You cannot leak what you never granted.
SNMP: read-only, v3 where you can, dedicated always
SNMP has two permission levels, and the difference is enormous. The read credential lets you ask about port status and serial numbers. The write credential lets you change device configuration remotely. Discovery gets read-only, full stop — never the write string, not even for convenience, not even temporarily. Prefer SNMPv3, which uses real usernames with authentication and encryption. Choose it over v2c community strings that cross the network in plain text. Where old gear forces v2c on you, treat the community string as the password it is. Make it unique to your organization (retire public on sight) and dedicated to monitoring rather than shared with other tooling. The full hardening treatment — versions, views, and access lists — is covered in securing SNMP.
WMI: a dedicated service account, scoped and documented
For Windows depth, create a dedicated domain service account used by discovery and monitoring alone. It must not be a shared admin login, and absolutely not a human's account. Grant it the narrowest read rights that satisfy your queries. Those are remote-access permissions to WMI itself plus membership in the built-in low-privilege groups designed for exactly this kind of remote reading. Now the honest note, because Windows deserves one. Some WMI queries and some environments stubbornly refuse to work until the account holds broader (even administrator-level) membership on target machines. If you hit that wall, do not shrug and go global. Minimize the scope — broader rights on only the machine classes that need it. And document exactly what was granted, where, and why. An over-privileged account that is written down and reviewed is a managed risk. The same account undocumented is a future security finding with your name in the commit history.
SSH: a read user, restricted where supported
For Linux hosts and CLI-managed network gear, give discovery its own user with key-based login and no ability to modify anything. Many platforms let you go further and restrict which commands a user may run. Examples include network operating systems with role-based privilege levels, and command restrictions on the server side. With these restrictions, the discovery user can run its show-and-read commands and literally nothing else. Where such restriction exists, use it; where it does not, an unprivileged user (with no sudo) is the floor.
The other side of the key: provisioning access on the devices
A detail that surprises many first-timers: credentials are two-sided. Handing the scanner a username does nothing unless the devices have been told to honor it. That means SNMP enabled with your community or v3 user configured. It means the Windows service account granted its rights, and the SSH user created. Discovery does not conjure access; it uses access you provisioned. So a credential rollout is really a small fleet-configuration project, and it is worth doing with fleet tools rather than device-by-device clicking.
For Windows, that means group policy or your configuration management. Create the service account once in the directory. Then push the WMI remote-access rights and group memberships to servers centrally. That way, every current and future member of the class honors the same account automatically. For network gear, put the SNMP stanza into your standard device configuration template. That stanza includes the v3 user or community, read-only view, and the source access list. That way, a switch is born speaking to the monitor rather than adopted later. Printers and appliances usually mean a web-interface visit each, which is tedious but a one-time cost per device. Do it as part of deployment, not as a someday project.
This is also why the per-class credential design works at all: provisioning is naturally per-class too. One directory group policy covers the Windows fleet; one configuration template covers the switches. And it is why new-device intake should include the line "provision monitoring access". A device deployed without its class credential is a device that will sit nameless in every scan until someone wonders why.
Credential hygiene at scale
One credential per device would be maximally secure and maximally unmanageable. One credential for the entire estate is convenient and means one leak unlocks everything. The working middle is the credential set: one credential per device class. Use one SNMPv3 user for network infrastructure, one WMI service account for Windows servers, and one SSH identity for Linux. Perhaps use a separate community for printers and another for UPS and facilities gear. Five or six secrets total — few enough to manage properly, partitioned enough that a compromised printer community does not open your firewalls. That is the blast-radius middle ground, and discovery tools are built for it. You define the sets, and the scanner tries the appropriate set per device class.
One prohibition worth italics: never let discovery run as a human's account — not the admin's, not yours, not "just until we make the service account." Human accounts change passwords, get disabled on departure, and carry privileges discovery must never hold. Every one of those events becomes a mysterious monitoring outage. Machines get machine accounts.
Three habits keep the sets healthy. Vault the secrets: credentials live in a password manager or secrets vault and inside the discovery tool's encrypted store. They never belong in the scan-runbook wiki page, never in a spreadsheet column named "password". (That column exists in more organizations than anyone will admit.) Rotate on staff change: when someone with access to the monitoring credentials leaves, rotate those credentials, same as any shared secret. This is where per-class sets pay off — rotating five secrets is an afternoon; rotating five hundred ad-hoc ones is a project nobody starts. Keep an account register: use one short document listing every discovery and monitoring account that exists. List what class of device each account can touch, what privilege it holds, and where it is used. When the security review asks "what is this account?", the register answers in one glance. And when it lists an account nobody can explain, you have found this quarter's cleanup task.
Scanning safely: restriction, vantage, lockouts, audits
Only the monitor gets to speak
A read credential is still a credential, so shrink who can use it. Most devices let you restrict management protocols by source address. Configure SNMP and SSH access lists so those questions are answered only when they come from the monitoring server's address. Now the credential alone is not enough. An attacker who steals the community string must also speak from the one address allowed to use it. The poller as sole speaker is cheap defense in depth, and it has a pleasant side effect. Any credentialed query from an unexpected source is, by definition, worth investigating.
Scan from the right vantage
Discovery should run from wherever your monitoring legitimately speaks to devices — the management path. It should not run from a random workstation that happens to have the tool installed. That keeps firewall rules coherent (one source to permit), keeps the source-address restrictions above honest, and matches where recurring scans will run forever after. Placing that vantage point, including probes for remote sites and isolated segments, is the territory of the monitoring architecture guides.
Respect the lockout policy
Here is the classic discovery self-inflicted wound. Windows domains enforce account lockout: a few failed logins in a row and the account is disabled for a while. Now imagine a discovery scan configured with a stale service-account password. It walks politely through three hundred Windows machines, failing authentication on each. And it locks the service account, fleet-wide, in minutes. Everything that depended on that account stops. The monitoring system, with the finest intentions, has performed a small denial-of-service on itself, and possibly on whatever else shared the account.
Prevention is three-fold: map credentials to device classes correctly so the scanner is not trying Windows passwords against printers. Verify a changed credential against ONE device before any wide scan. And know your lockout threshold, so a bad password is caught on the first failure report rather than the three-hundredth. Discovery tools generally stop retrying a failed credential quickly — but the first attempt across a whole fleet is enough when the password is simply wrong.
Expect to be audited — make it easy
Discovery logins are logins. Every credentialed query lands in device logs and security event logs exactly like a human's would. A scheduled scan produces a metronome of them. Name the accounts so those entries explain themselves. For example, svc-discovery appearing on four hundred machines at 02:00 nightly reads as infrastructure doing its job. Meanwhile, jsmith2 doing the same reads as an incident, and deserves to. Clear naming, a predictable schedule, and a heads-up to whoever reviews the logs turn your scan from a weekly false alarm into background noise everyone understands. The metronome cuts both ways, usefully. Once reviewers know the pattern, a deviation in it is a genuinely meaningful alarm. That could be the discovery account logging in from a strange address, or at a strange hour. Most log noise cannot claim as much.
Failure symptoms and their fixes
Credential problems in discovery have one dominant symptom: devices found but nameless. The scan sees them — they answer pings, they occupy ARP entries — but they have no identity, because the interrogation pass got no answer. Sometimes a whole class shares the symptom (every Windows box is a shape, every switch is anonymous). In that case, the diagnosis is almost always one bad or missing credential in that class's set. That could be a mistyped community, an expired password, or a v3 user with mismatched passphrases. Or it could be gear someone deployed with SNMP disabled entirely. One nameless device is a device problem; a nameless class is a credential problem.
Watch for credential drift too: access that worked last month and quietly stopped. The usual culprits include a password rotated by someone who did not know discovery used it. Another is a directory policy change that removed the service account's rights. Other usual culprits are an expiring account nobody marked as non-expiring, or a device replaced by a spare that never got the SNMP stanza. The tell is a device (or class) that used to report identity and now shows up bare, or monitoring checks that flip to "access denied" overnight. Treat that signal as a broken contract to repair the same day. Every day a class stays dark, its inventory records rot. And treat repeated drift as a process bug: whoever rotates passwords needs the account register in front of them.
The habit that prevents most of it is a small ritual whenever a new device class or credential enters service:
- 1. Test the credential against one device by hand. Use an
snmpwalkof the system group (the snmpwalk tutorial shows exactly how), a remote WMI query, or an SSH login. Confirm you get identity, not just a connection. - 2. Confirm the restrictions — the same query from a non-monitoring address should fail, proving the source ACL works.
- 3. Add the credential to the right set in the discovery tool, mapped to the right device class.
- 4. Rescan just that class and check that the nameless become named.
- 5. Record it in the account register — account, scope, storage location, rotation trigger.
Five minutes per credential, and the fleet-wide surprises simply stop happening.
The credential design worksheet
Filled in, this table is your account register — the one document that answers what exists, what it touches, and when it changes:
| Protocol / class | Account | Scope granted | Stored where | Rotates when |
|---|---|---|---|---|
| SNMPv3 — network gear | mon-snmp | Read-only, source-restricted to poller | Vault + monitoring tool store | Staff change; suspected exposure |
| SNMPv2c — printers, UPS | Dedicated community | Read-only, source-restricted | Vault + monitoring tool store | Staff change; yearly review |
| WMI — Windows servers | svc-discovery | Remote read; elevated only where documented | Vault + monitoring tool store | Staff change; on lockout event review |
| SSH — Linux hosts | svc-discovery (key) | Unprivileged user, no sudo | Key in vault; public key deployed | Staff change; key age policy |
| SSH — network CLI gear | mon-readonly | Read-only privilege role | Vault + monitoring tool store | Staff change |
Where to go next
Credentials are the least glamorous part of discovery and the highest-leverage one. A morning spent creating clean read-only accounts upgrades every scan you will ever run from shapes to identities. Design them per class, grant read and nothing else, restrict who may use them, and write the register. With the keys sorted, the rest of the pipeline opens up. That includes pouring scan results into a trustworthy inventory, keeping that inventory current automatically, and auto-enrolling what you find into monitoring. The full set lives at Network Discovery & Asset Inventory.
Put this into practice with SysPeep Monitor
SysPeep Monitor puts this design to work. Define your read-only SNMP, WMI, and SSH credentials once. Its auto-discovery uses them to turn anonymous addresses into named devices with interfaces ready to monitor. It does all this from one Windows machine. Try it on the free trial and watch the nameless get names.
Download Free TrialLearn About SysPeep