Sample Header Ad - 728x90

get chain of users created by chaining su calls

6 votes
4 answers
584 views
While administrating a linux server (a Debian server, for instance), I often switch users. Sometimes, I will chain multiple user switches together:
aluriak$ sudo -s
root$ […]
root$ su aluriak
aluriak$ […]
aluriak$ su db
db$ […]
db$ 
aluriak$ su front
front$ […]
Is there any way for me to get the "chain of users" I created that way? In the upper example, that hypothetical utility would output something along the lines of front aluriak root aluriak, because I am the front user, that logged in from aluriak user, that himself logged in from root account, that itself was reached from the aluriak account.
Asked by aluriak (193 rep)
Mar 11, 2025, 04:38 PM
Last activity: Mar 13, 2025, 10:17 AM