如何查找特定用户可执行的所有文件(不是最新的)
16lz
2021-01-22
How to find all files which can be executed by specific user (not current!)
如何查找特定用户可以执行的所有文件(不是最新的!)
For current I can do it like
对于目前我可以这样做
find /some/start/dir -executable
But now I want to do something like: find all files which user 'josh' can execute (by 'other' permissions, 'user' permissions and 'group' permissions). Of course, I do not know users's 'josh' password so I cannot su'ing.
但现在我想做一些事情:找到用户'josh'可以执行的所有文件(通过'其他'权限,'用户'权限和'组'权限)。当然,我不知道用户的'josh'密码,所以我不能suing。
2 个解决方案
#1
3
Look up the user id of "josh" in /etc/passwd.
在/ etc / passwd中查找“josh”的用户ID。
Then run: find /some/start/dir -type "f" -uid <ID> -perm 111.
然后运行:find / some / start / dir -type“f”-uid
更多相关文章
- 在linux 列出 超级用户 普通用户和 系统用户
- linux 用户和组操作
- Linux服务器权限管理实践——添加用户只访问某些文件目录
- 在Linux中使用PAM进行身份验证为什么它可能无法从某些用户运行?
- Linux文件权限查看及修改命令chmod
- linux文件目录权限和系统基础优化命令
- LINUX下CVS服务器安装及权限简单配置
- 关于使用samba用户的权限设置
- 深入理解linux的权限设置和SUID,SGID