Most engineers think…
Most engineers think pbrun is just "enterprise sudo" — same tool, paid licence — and that joining Linux to AD means syncing AD users into /etc/passwd.
Wrong on both counts. sudo decides on the box from a file root can edit; pbrun ships the request to pbmasterd on a central policy server, which answers accept or reject and records every keystroke into a replayable iolog. And AD Bridge never copies users into /etc/passwd — identities resolve live from AD via NSS/PAM, so disabling one AD account locks a leaver out of all 500 servers in one click.
① The Unix root problem — 500 servers, 500 rulebooks, zero answers
Aditya runs Linux operations at Infosys for a banking client. The estate: 500 RHEL servers (10.20.0.0/16), a shared root password that has lived in a team spreadsheet since 2019, and a hand-edited sudoers file on every box. It works — until the RBI-empanelled auditor asks two questions: who could run a root shell on these servers last quarter, and what did they type? Aditya has no answer for either.
Here is why sudo stops scaling. The decision is local — each server consults its own file, and 500 files drift apart within months. The evidence is local — sudo writes to syslog on the same box, and anyone who becomes root can edit or erase that log. There is no keystroke record — once a user lands in a root shell, sudo logs one line ("opened a shell") and goes blind. And there is no entitlement report — no single command anywhere can answer "who can run what, where". A shared root password is even worse: every login shows up as root, so actions are unattributable by design.
Pause & Predict
Predict: the auditor asks Aditya for last quarter’s root activity on db07. With plain sudo + shared root, what is the BEST evidence he can physically produce? Type your guess.
The four failures auditors circle in red
Tap each card — these are the exact gaps PMUL and AD Bridge were built to close.
Every login is "root" — nobody is anybody. Unattributable by design. So: individual identity must come first.
500 hand-edited files, no versioning, no owner. So: one central rulebook beats 500 local ones.
sudo logs the command, then goes blind inside the shell. So: you need a flight recorder, not a doorbell log.
No command answers "who can run what, where". So: entitlement reporting is an audit requirement, not a luxury.
The auditor asks Aditya at Infosys: "Show me everyone who could run a root shell on these 500 servers, and what they typed last month." With local sudoers + shared root, what is his honest answer?
② PMUL — pbrun, the policy server & the flight recorder
PMUL is the product the field still calls PowerBroker. Think of it as a gram panchayat for root: pbrun is the application form you submit, pbmasterd is the sarpanch who stamps ACCEPT or REJECT according to the one rulebook (/etc/pb.conf), pblocald is the clerk who actually does the work, and pblogd is the registrar writing every word into the register. Four daemons, four jobs, one estate-wide answer.
$ pbrun id $ pbrun /usr/sbin/useradd appdeploy $ pbrun --testmaster=pbmaster01.corp.icici.in /sbin/shutdown -r now
uid=0(root) gid=0(root) groups=0(root) # useradd: policy accepted — runs as root, silent on success pbrun: Request rejected by pbmaster01.corp.icici.in # --testmaster = dry-run: shows the decision, executes nothing (reject text varies by version/policy)
The rulebook itself, /etc/pb.conf, is written in PMUL’s event-driven, C-like policy language: variables such as user, command and runhost flow into conditions, and the first accept; or reject; ends the decision. Set the iolog variable in an accept branch and the entire session — every keystroke in, every byte out — is recorded to a log file you can replay later with pbreplay. That recording is the flight recorder sudo never had. One caution from the field: anything typed inside the session, including passwords at hidden prompts, lands in the iolog — treat iologs as secrets and restrict who can replay them.
▶ One pbrun request, end to end
Rahul at HCL restarts nginx on web14 (10.20.4.14) through PMUL. Press Play for the healthy path, then Break it to see the failure.
$ pbcheck -s -f /etc/pb.conf $ pbcheck -e -f /etc/pb.conf > entitlement.csv $ pbreplay -t /var/adm/pb.rahul.web14.2026-06-08.a04412
# syntax check: no errors reported — safe to push # entitlement.csv = who can run what, where (the auditor answer) [2026-06-08 14:21:07] systemctl restart nginx [2026-06-08 14:21:09] tail -50 /var/log/nginx/error.log # -t prefixes each replayed line with its timestamp
Symptom: minutes after a policy edit, every pbrun in the estate starts getting rejected (or worse, an over-permissive branch starts accepting everything). Cause: pbmasterd only reports policy errors to its own log at runtime — there is no compile step protecting you. Fix: pbcheck -s -f /etc/pb.conf before every push, then pbrun --testmaster=<policy-server> <command> to dry-run the exact accept/reject decision without executing anything.
Sudo Manager — keep sudo, centralise the chaos
Ripping out sudo on day one is politically impossible in most Indian estates — admins have muscle memory and run-books reference sudo everywhere. Sudo Manager is the middle path: a sudo plugin (pbsudomgr.so) goes onto each host, sudomgrinstall registers the host and uploads its existing sudoers to the policy server, and from then on sudoers files are checked out, edited and checked back in centrally (via pbadmin) — like a head-office recipe book every branch kitchen must cook from. Sudo sessions can be iologged and replayed with the same pbreplay. Admins keep typing sudo; the auditor finally gets one source of truth. Also know pbssh: it brokers and records SSH to agentless devices, but with no agent on the target it cannot elevate anything there.
Rahul at HCL faces this
pbrun works instantly from most servers, but from two new DC subnets it hangs forever — same user, same policy, same command.
The new DC firewall opened only TCP 24345–24347. PMUL’s dynamic (optimized) connections also use a configurable listening range — default 1024–65535 — and those ports are silently dropped, so some sessions never complete the handshake.
Run pbrun -d connect from an affected host: the connection attempt to the policy server stalls mid-handshake instead of failing fast. Healthy hosts complete in milliseconds.
/etc/pb.settings → minlisteningport / maxlisteningport (submit hosts + policy server), then the DC firewall rule setConstrain the dynamic range in /etc/pb.settings on all hosts (e.g. minlisteningport 49152 / maxlisteningport 49251), open exactly that range on the firewall alongside 24345–24347, restart the PMUL daemons.
pbrun id from each affected subnet returns uid=0(root) instantly, and the new events appear in pblogd’s log — confirm with a quick pbreplay of one session.
Priya at ICICI types pbrun systemctl restart postgresql on db07. Where is the allow/deny decision actually made?
Pause & Predict
Predict: the only policy server goes down for patching at 2 AM. What happens to pbrun across 200 servers — and what should the design have been? Type your guess.
③ AD Bridge — one identity for every Linux box
PMUL fixed what runs as root. The second sprawl is who exists at all: 500 servers × local accounts in /etc/passwd means leavers who never leave, password rules nobody enforces, and a different UID for the same human on every box. AD Bridge is Aadhaar for Linux machines: the server joins Active Directory, and from then on identities resolve live through NSS/PAM via the agent — nothing is ever copied into /etc/passwd. Disable one AD account and the leaver is locked out of all 500 servers before the exit interview ends. Logins get Kerberos SSO with the same AD credentials used on Windows.
$ sudo /opt/pbis/bin/domainjoin-cli join --ou Linux/Prod corp.flipkart.internal svc-adjoin@corp.flipkart.internal $ sudo /opt/pbis/bin/domainjoin-cli query
Joining to AD Domain: corp.flipkart.internal Password: SUCCESS Name = pgapp12 Domain = CORP.FLIPKART.INTERNAL Distinguished Name = CN=PGAPP12,OU=Prod,OU=Linux,DC=corp,DC=flipkart,DC=internal
Symptom: domainjoin-cli prints SUCCESS, but AD logins fail on the spot. Two causes bite again and again. One: the first join requires a restart before AD logons work — the docs say it plainly, and everyone skips it. Two: DNS was faked — the docs’ pre-checks are nslookup <domain> and ping <domain>; if someone "fixed" resolution via /etc/hosts, the join may pass but Kerberos breaks later. Reboot after first join, and make real DNS a gate, not an afterthought.
What the join actually touches: /etc/nsswitch.conf, /etc/pam.d/*, /etc/krb5.conf and /etc/hosts — which is why a botched join breaks logins, not just "AD stuff". Identity mapping lives in cells: the single Default Cell serves the whole forest, while Named Cells attach to specific OUs (stored as a serviceConnectionPoint object’s keywords attribute) so the same AD user can hold UID 1001 in dev and UID 5001 in PCI prod — or legacy servers can keep their historical UIDs while still mapping to one AD identity. In Directory Integrated mode the Unix attributes (uidNumber, gidNumber, loginShell, unixHomeDirectory) sit on the AD objects using the RFC 2307 schema. And Group Policy comes to Linux: the agent applies GPOs every 30 minutes, at boot, or on demand with /opt/pbis/bin/gpupdate --verbose, caching them under /var/lib/pbis/grouppolicy — sshd settings, sudoers fragments, message-of-the-day, pushed from GPMC like any Windows fleet.
Meera at Wipro faces this
A joined SLES server loses AD authentication after every reboot — "lost connection to domain" — until someone manually restarts the AD Bridge services. Then it works perfectly until the next reboot.
Service start ordering: lsass (the AD Bridge auth service) comes up before the network stack is fully ready, fails its first domain contact, and never recovers on its own — a known pattern on SLES and older releases (tracked publicly on the pbis-open GitHub issues).
Right after a reboot, run /opt/pbis/bin/get-status — it shows the domain offline while the network is clearly up; system logs show lsass starting before the interface got its address.
/opt/pbis/bin/get-status → then journalctl / /var/log/messages for the lsass vs network start orderFix the unit/service ordering so AD Bridge services start after the network is online (or add a conditioned restart of the AD Bridge services post-network-up). Keep the agent on a current release.
Reboot the box in a maintenance window: get-status reports the domain online without manual help, and an AD user can ssh in on first try.
The same AD user must be UID 1001 on dev servers but UID 5001 on the PCI prod segment — both tied to one identity for audit. Which AD Bridge feature does this?
Pause & Predict
Predict: domainjoin-cli just printed SUCCESS on pgapp12. Meera immediately tries ssh meera.iyer@pgapp12 with her AD password. What happens? Type your guess.
④ Deploying it — HA, log servers & the Password Safe split
Production layout first. The policy server is now your root decision point, so it gets the availability treatment: at least two policy servers in every estate, listed in order in each host’s submitmasters entry in /etc/pb.settings — pbrun walks the list and fails over automatically. Logging moves to a dedicated log server (pblogd) so evidence survives even if a run host is compromised, and so iologs — which may contain typed secrets — live on a hardened box with restricted pbreplay access. Policy changes go through a pipeline: edit → pbcheck -s → pbrun --testmaster dry-runs → push. In Indian enterprise estates this stack shows up wherever Unix meets auditors: core-banking Linux farms at banks (RBI audits ask precisely the "who can run what" question), telecom OSS/BSS estates, and the managed-services floors at Infosys, TCS, HCL and Wipro — whose PAM job descriptions explicitly want Linux/UNIX depth alongside the vault skills.
Now the better-together design. PMUL does not remove root — it makes using root rare. The remaining root password still exists, so it goes into Password Safe as a managed account: vaulted, auto-rotated on schedule and after every release, checked out only for break-glass moments (the policy server farm itself is down, single-user-mode recovery, filesystem surgery). Think bank locker (vaulted root, dual keys, register) plus the society watchman’s register for daily work (pbrun, every entry logged). AD Bridge supplies the one identity both pillars reference: the same corp\sneha.rao who authenticates to Linux via Kerberos is the user PMUL policy evaluates and the requester Password Safe records. One human, one identity, three controls.
POST https://bi.corp.flipkart.internal/BeyondTrust/api/public/v3/Auth/SignAppIn
Authorization: PS-Auth key=<128-char-api-key>; runas=corp\sneha.rao;
POST https://bi.corp.flipkart.internal/BeyondTrust/api/public/v3/ISARequests
{ "SystemID": 214, "AccountID": 902, "DurationMinutes": 60 }200 OK {"UserId":41,"UserName":"corp\\sneha.rao", ...} # session state kept between calls
201 Created
"V9r!t2#kPq8w..." # the root password — released 60 min, rotated on expiry
# ISA role = instant, approval-less retrieval; every release still lands in the audit log(1) pbcheck -e produces a current entitlement CSV — your standing auditor answer. (2) pbreplay of a random recent iolog plays back cleanly — the flight recorder is recording. (3) /opt/pbis/bin/get-status on a sample of joined boxes shows the domain online. (4) In BeyondInsight, the root managed accounts show green last-rotation status — the break-glass key is fresh.
Design review at ICICI: the estate needs BOTH root passwords handled and day-to-day elevation controlled. Which split is the intended better-together?
Pause & Predict
Predict: with this split live for six months, how often should a human actually check the root password out of Password Safe? Type your guess.
🤖 Ask the AI Tutor
Tap any question — instant, scoped to this lesson. No login, no waiting.
Pre-curated from BeyondTrust docs + community Q&A, scoped to this lesson. For a live prod issue, paste your export into chat.techclick.in.
📝 Wrap-up assessment — six more
You've answered 4 inline. Six left. 70% (7 of 10) marks the lesson complete on your profile. Tap Submit all answers at the end.
🧠 In your own words
Type one line: In one line: what changes about the root decision when you move from sudo to pbrun? Then compare to the expert version.
🗣 Teach a friend
Best way to lock it in — explain it in one line to a teammate. Tap to generate a paste-ready summary.
📖 Glossary
- pbrun
- PMUL’s submit command — like sudo, but the allow/deny decision is made centrally by the policy server.
- pbmasterd
- Policy server daemon (TCP 24345) that evaluates /etc/pb.conf and stamps accept; or reject; on each request.
- pblocald
- Run-host daemon (TCP 24346) that executes the accepted task, typically as root.
- pblogd
- Log server daemon (TCP 24347) that writes event logs and iologs — the central register.
- iolog
- Full keystroke + output recording of a PMUL session, enabled by the iolog policy variable; treat as a secret.
- pbreplay
- Plays back an iolog like CCTV footage — interactive or batch, with timestamps.
- pbcheck
- Policy pre-flight: -s syntax-checks pb.conf, -e prints the who-can-run-what-where entitlement report (CSV).
- pbssh
- Brokers + records SSH to agentless devices (routers, firewalls). Cannot elevate on the target — no agent there.
- Sudo Manager
- PMUL mode keeping native sudo while sudoers files are stored, versioned and checked out/in centrally (pbsudomgr.so + pbadmin).
- AD Bridge
- Joins Linux/Unix to Active Directory (formerly Likewise/PBIS — hence /opt/pbis paths): live identity, Kerberos SSO, Linux GPO.
- Cell
- AD Bridge container for Unix identity data. One enterprise-wide Default Cell; Named Cells attach to OUs for per-environment UID/GID.
- domainjoin-cli
- AD Bridge join tool (/opt/pbis/bin): join, leave, query, fixfqdn. First join requires a reboot before AD logons work.
📚 Sources
- BeyondTrust Docs — EPM for Unix & Linux overview (pbrun → pbmasterd accept/reject → pblocald → pblogd request flow). docs.beyondtrust.com/epm-ul/docs/epm-ul-overview
- BeyondTrust Docs — pbrun options (--testmaster, -h, -u) + Firewalls/Port Usage (pbmasterd 24345, pblocald 24346, pblogd 24347; dynamic min/maxlisteningport ranges). docs.beyondtrust.com/epm-ul/docs/pbrun · docs.beyondtrust.com/epm-ul/docs/firewalls
- BeyondTrust Docs — Sudo Manager User Guide (pbsudomgr.so plugin, central sudoers check-out/check-in, pbadmin, sudomgrinstall) and pbssh for SSH-managed devices (no elevation on target). docs.beyondtrust.com/epm-ul/docs/sudo-manager-user-guide · docs.beyondtrust.com/epm-ul/docs/connections-to-ssh-managed-devices
- BeyondTrust Docs — pbreplay and pbcheck administration programs (iolog playback options; -s syntax check, -e entitlement report). beyondtrust.com/docs/privilege-management/unix-linux/admin/administration-programs/pbreplay.htm · …/pbcheck.htm
- BeyondTrust Docs — AD Bridge: domain-join tool, join prerequisites (nslookup/ping, restart-before-logon), cells (Default vs Named, serviceConnectionPoint), Group Policy agent (30-min refresh, /opt/pbis/bin/gpupdate, /var/lib/pbis/grouppolicy). docs.beyondtrust.com/adb/docs/domain-join-tool · docs.beyondtrust.com/adb/docs/ad-bridge-group-policy-settings
- GitHub BeyondTrust/pbis-open issues #171 & #217 — field reports: AD Bridge agent loses domain connection after reboot (lsass vs network start ordering on SLES). github.com/BeyondTrust/pbis-open/issues/171
- Community walkthrough — joining Ubuntu to AD with PBIS/AD Bridge (real domainjoin-cli session ending in SUCCESS). blog.yasithab.com/ubuntu/how-to-join-ubuntu-computer-to-active-directory-domain-using-pbis/
- PeerSpot reviews + identityskills 2026 PAM career comparison — BeyondTrust’s Unix story (PowerBroker heritage) as a differentiator vs CyberArk; India job-market demand and the two-PAM-tools hiring pattern. peerspot.com/products/beyondtrust-password-safe-pros-and-cons · identityskills.com/blog/cyberark-vs-beyondtrust-vs-delinea-which-pam-tool-should-you-learn-in-2026/
What's next?
Your Unix estate now has one rulebook and one identity. Next: wiring BeyondTrust into everything else — REST API authentication, SAML SSO, ServiceNow ticket-gated checkouts, SIEM forwarding and Entra ID.