Skip to content

Eternal Center

  • System (系统)
  • Services (服务)
  • Databases (数据库)
  • Clusters (集群)
  • Big Data (大数据)
  • Cloud Computing (云计算)
  • Languages (语言)
  • Project (项目)
  • Writings (写作)
  • Eternity (永恒)
  • News (消息)
  • Chronicle (编年史)
  • Words (言)
Posted on July 20, 2020January 25, 2022 by Mingyu Zhu

[步骤] sudo 提权的实现 (通过用户自己的密码实现 sudo 提权) (openSUSE & SLE)

步骤一:给用户添加相应的 sudo 权限

# vim /etc/sudoers

添加以下内容:

……
zhumingyu ALL=(ALL) /usr/bin/mysql

(补充:这里以给用户 zhumingyu 添加 /usr/bin/mysql 命令为例)

步骤二:设置用户使用自己的密码实现 sudo 提权

# vim /etc/sudoers

将以下内容:

......
#Defaults targetpw   # ask for the password of the target user i.e. root
#ALL    ALL=(ALL) ALL   # WARNING! Only use this together with 'Defaults targetpw'!
......

修改为:

......
Defaults targetpw   # ask for the password of the target user i.e. root
ALL    ALL=(ALL) ALL   # WARNING! Only use this together with 'Defaults targetpw'!
......
CategoriesChinese (中文), System (系统), System Login Security (系统登录安全), System Network & System Security & System Log (系统网络 & 系统安全 & 系统日志), System Privilege (系统权限), System Security (系统安全), System User & System Privilege (系统用户 & 系统权限)

Post navigation

Previous PostPrevious [排错] 解决 CentOS Linux & RHEL 使用 yum 命令时报错 “rpmdb BDB0113 Thread/process” 或者被卡住
Next PostNext [命令] Linux 命令 service (管理程序单元)

Aspiration (愿景):

Everyone can achieve self achievement and self happiness fairly

每个人都能公平地实现自我成就和自我幸福

Position (位置):

Running on Evolution Host and DigitalOcean

正在 Evolution Host 和 DigitalOcean 上运行

Logo (徽标):

Additional Information (其他信息):

About Manual Clone Contact Disclaimer Donation Friendly Links 关于 说明书 克隆 联系 免责申明 捐赠 友情链接

Standby IP Address (备用 IP 地址):

152.69.204.95  150.230.63.10  Please configure before use / 请先配置再使用

Search Outside Website (站外搜索):

Google Wikipedia Bing
Proudly powered by LNMP Proudly powered by WordPress