Hi all,
I put together a small bash script for sysadmins managing Posit Workbench from the command line. It adds two things:
- Tab completion for
/usr/sbin/rstudio-server: subcommands at position 1, live session tokens for kill/suspend, registered usernames for user management subcommands. rstudio_active_sessions: lists active sessions with display names resolved from Active Directory via LDAP/Kerberos (or sssd if that's your kink, not judging), plus a session duration breakdown in days/hours/minutes.
The session completion tokens are in username_DisplayName:sessionId format so you know who will scream from down the corridor before you pull the trigger. The wrapper function strips the token down to the bare sessionId before passing it to rstudio-server.
Tested on Posit Workbench 2025.09.0 on RHEL 9. Requires jq, mlr, and ldapsearch. Site-local hostnames are kept in a separate untracked config file.
Happy to hear if others have done something similar or have improvements.