linux的网络组/域的等效命令?
我已经找了好一阵子了,到处都找不到 首先,是否有等同于以下命令:linux的网络组/域的等效命令?,linux,dns,usergroups,Linux,Dns,Usergroups,我已经找了好一阵子了,到处都找不到 首先,是否有等同于以下命令: wmic computersystem get domain 返回当前用户的主域 我一直在想,是否有一个等效的命令: net group /domain 返回用户当前域的所有全局组的命令 到目前为止,我一直在尝试在/etc/上搜索不同的网络文件,目前我找到的唯一相关文件是reslov.conf,它包含所有DNS,它可能包含比我实际需要的更多的信息。[这意味着我必须查询那里的每个域并“询问”用户是否与该域关联]有没有比这更有效的
wmic computersystem get domain
返回当前用户的主域
我一直在想,是否有一个等效的命令:
net group /domain
返回用户当前域的所有全局组的命令
到目前为止,我一直在尝试在/etc/上搜索不同的网络文件,目前我找到的唯一相关文件是reslov.conf,它包含所有DNS,它可能包含比我实际需要的更多的信息。[这意味着我必须查询那里的每个域并“询问”用户是否与该域关联]有没有比这更有效的方法
谢谢。您提到的域的概念很模糊 wmic computersystem get domain的等价物是
dnsdomainname
这不是返回当前用户主域(Active Directory域或其他域)的命令
使用samba映射的给定Unix用户的Active directory域命令是
wbinfo --sid-to-fullname `wbinfo --uid-to-sid username` | awk -F "\\" '{print $1}'.
另请参见以下相关内容
netgroup/domain
的等价物是由Samba提供的netadsgroup-w
。net组/域
不是您描述的当前用户,如果您希望使用与您描述相同的命令,则需要将-U
添加到给定的等效命令中
如果您只是寻找一个命令来获取当前用户的组,则根据Winbind配置将unix组和现有Windows组的getent group | grep username
转换为unix组,或者
wbinfo --user-domgroups `wbinfo --uid-to-sid username`
用于域中当前用户的全局组。Un*x主机名
请参见人工主机
,人工挖掘
和人工主机名
。还可以查看手册页中的“另请参见”部分
Linux下的Windowsnet
命令
您必须至少安装samba客户端
软件包。安装samba
suite后,您将能够运行linux的net
命令:
net help
Usage:
net rpc Run functions using RPC transport
net rap Run functions using RAP transport
net ads Run functions using ADS transport
net file Functions on remote opened files
net share Functions on shares
net session Manage sessions
net server List servers in workgroup
net domain List domains/workgroups on network
net printq Modify printer queue
net user Manage users
net group Manage groups
net groupmap Manage group mappings
net sam Functions on the SAM database
net validate Validate username and password
net groupmember Modify group memberships
net admin Execute remote command on a remote OS/2 server
net service List/modify running services
net password Change user password on target server
...
net help Print usage information
Valid targets: choose one (none defaults to localhost)
-S or --server=<server> server name
-I or --ipaddress=<ipaddr> address of target server
-w or --workgroup=<wg> target workgroup or domain
Valid miscellaneous options are:
-p or --port=<port> connection port on target
-W or --myworkgroup=<wg> client workgroup
-d or --debuglevel=<level> debug level (0-10)
...
net帮助
用法:
net rpc使用rpc传输运行函数
使用rap传输的net rap运行函数
net ads使用ads传输运行函数
net文件在远程打开的文件上的函数
股票的净份额函数
net会话管理会话
net服务器列出工作组中的服务器
网络域列出网络上的域/工作组
net printq修改打印机队列
net用户管理用户
net组管理组
net组映射管理组映射
sam数据库上的net sam函数
net验证用户名和密码
net组成员修改组成员身份
net管理员在远程OS/2服务器上执行远程命令
net服务列表/修改正在运行的服务
net密码更改目标服务器上的用户密码
...
net帮助打印使用信息
有效目标:选择一个(无默认为localhost)
-S或--server=服务器名称
-I或--ipaddress=目标服务器的地址
-w或--workgroup=目标工作组或域
有效的其他选项包括:
-p或--port=目标上的连接端口
-W或--myworkgroup=客户端工作组
-d或--debuglevel=调试级别(0-10)
...
net help
Usage:
net rpc Run functions using RPC transport
net rap Run functions using RAP transport
net ads Run functions using ADS transport
net file Functions on remote opened files
net share Functions on shares
net session Manage sessions
net server List servers in workgroup
net domain List domains/workgroups on network
net printq Modify printer queue
net user Manage users
net group Manage groups
net groupmap Manage group mappings
net sam Functions on the SAM database
net validate Validate username and password
net groupmember Modify group memberships
net admin Execute remote command on a remote OS/2 server
net service List/modify running services
net password Change user password on target server
...
net help Print usage information
Valid targets: choose one (none defaults to localhost)
-S or --server=<server> server name
-I or --ipaddress=<ipaddr> address of target server
-w or --workgroup=<wg> target workgroup or domain
Valid miscellaneous options are:
-p or --port=<port> connection port on target
-W or --myworkgroup=<wg> client workgroup
-d or --debuglevel=<level> debug level (0-10)
...