useradd thomas 添加用户
passwd thomas 密码:123456
usermod -a -G wheel thomas -a, --append -G, --groups 添加到 wheel 组
id thomas
uid=1002(thomas) gid=1002(thomas) groups=1002(thomas),10(wheel)
[thomas@VM-0-14-centos ~]$ sudonetstat -lptun | grep sshd
We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:
#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.
[sudo] password for thomas:
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1414/sshd
本文介绍如何在CentOS系统中创建用户并设置密码,将用户添加到特定组,以及通过sudo命令检查SSH服务的状态。这些步骤对于系统管理员进行基本的用户管理和远程访问配置非常有用。
785

被折叠的 条评论
为什么被折叠?



