在linux上,用户可以(如果他有sudo权限)登录并控制另一个用户帐户/用户名,执行sudo su - username
但有没有办法查出是谁这样登录,并使用了我的帐户?
最佳答案
您可以使用last
命令。man last
:
last,lastb-显示上次登录用户的列表
DESCRIPTION
last searches back through the /var/log/wtmp file (or the file desig‐
nated by the -f option) and displays a list of all users logged in (and
out) since that file was created. One or more usernames and/or ttys
can be given, in which case last will show only the entries matching
those arguments. Names of ttys can be abbreviated, thus last 0 is the
same as last tty0.
关于linux - 使用su找出谁以我的身份登录,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/47692370/