小编Lju*_*vac的帖子

如何在 CentOS 7 中创建超级用户

我对 Linux 操作系统非常陌生(我已经开始使用 CentOS 7),所以我想知道是否可以创建某种与 root 具有相同权限的超级用户。我的意思是能够写入 + 读取 + 执行 root 用户拥有的文件夹和文件。为什么我需要这个?我有完全访问权限的 VPS。为了提高我的 Web 服务器的安全性,我创建了新用户并禁用了 root 登录,现在我通过 Putty 和 WinSCP 使用 RSA 公钥/私钥登录我的服务器。这是我的 sshd.conf:

Port my_port_number
Protocol 2

HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_ecdsa_key
HostKey /etc/ssh/ssh_host_ed25519_key

AuthorizedKeysFile  .ssh/authorized_keys
PasswordAuthentication no
RSAAuthentication no
PubkeyAuthentication yes
ChallengeResponseAuthentication no
PermitEmptyPasswords no

SyslogFacility AUTHPRIV

LoginGraceTime 15m
PermitRootLogin no
StrictModes yes
MaxAuthTries 2

GSSAPIAuthentication yes
GSSAPICleanupCredentials no

UsePAM no

IgnoreRhosts yes

X11Forwarding no
ClientAliveInterval 120
ClientAliveCountMax 720

AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
AcceptEnv …
Run Code Online (Sandbox Code Playgroud)

root user-permissions centos7

2
推荐指数
1
解决办法
1042
查看次数

标签 统计

centos7 ×1

root ×1

user-permissions ×1