Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Linux 使用su查找以我的身份登录的用户_Linux_Ubuntu - Fatal编程技术网

Linux 使用su查找以我的身份登录的用户

Linux 使用su查找以我的身份登录的用户,linux,ubuntu,Linux,Ubuntu,在linux上,一个人可以(如果他有sudo权限)登录并控制另一个用户帐户/用户名,执行sudo su-username 但是有没有办法找出谁像这样登录并使用了我的帐户?/var/log/auth.log包含ubuntu中sudo尝试的日志记录信息/var/log/auth.log包含ubuntu中sudo尝试的日志记录信息您可以使用last命令 最后一个人: last,lastb-显示上次登录用户的列表 您可以使用last命令 最后一个人: last,lastb-显示上次登录用户的列表 应该更

在linux上,一个人可以(如果他有sudo权限)登录并控制另一个用户帐户/用户名,执行
sudo su-username


但是有没有办法找出谁像这样登录并使用了我的帐户?

/var/log/auth.log
包含ubuntu中sudo尝试的日志记录信息

/var/log/auth.log
包含ubuntu中sudo尝试的日志记录信息

您可以使用
last
命令

最后一个人

last,lastb-显示上次登录用户的列表


您可以使用
last
命令

最后一个人

last,lastb-显示上次登录用户的列表


应该更多地介绍超级用户或Unix&Linux主题,但可以为大量日志配置sudo(任何sudo-ed命令)。但无论如何,试图保护您的帐户不受在计算机上具有管理员权限的人的攻击几乎是没有意义的。您只能使用加密技术保护静止的敏感数据。但规则是:你不信任机器的管理员,不要使用机器。我得到的唯一想法是使用
ps-u
并从非你的终端手动查找进程,或者如果你只是想知道是否有其他人以你的身份登录,可以使用
netstat
nestat-a-p
)关于SuperUser或Unix&Linux的主题应该更多,但是可以为大量日志配置sudo(任何sudo-ed命令)。但无论如何,试图保护您的帐户不受在计算机上具有管理员权限的人的攻击几乎是没有意义的。您只能使用加密技术保护静止的敏感数据。但规则是:你不信任机器的管理员,不要使用机器。我唯一的想法是使用
ps-u
,从非你的终端手动查找进程,或者如果你只是想知道是否有其他人以你的身份登录,可以使用
netstat
nestat-a-p
)应该可以工作,但它没有显示我的要求,但我得处理这件事。ThanksIt并没有表明我的要求,但我不得不这样做。谢谢
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.