Skip to content
Eternal Center

Eternal Center

  • Single-Node (单节点)
    • System (系统)
    • Service (服务)
    • Database (数据库)
    • Container (容器)
    • Virtualization (虚拟化)
  • Multi-Node (多节点)
    • Cluster (集群)
    • Big Data (大数据)
    • Cloud Computing (云计算)
    • Batch Processing (批量处理)
  • Approach (方式方法)
    • Languages (语言)
    • Ideas (思路)
    • Programing (编程)
    • Project (项目)
  • Eternity (永恒)
    • News (消息)
    • Creations (创作)
    • Classics (经典)
    • Legends (传说)
    • Chronicle (编年史)
    • FNIOS (宇宙公民开源学院)
Posted on July 20, 2020June 3, 2024 by Mingyu Zhu

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

  • 步骤一:给用户添加相应的 sudo 权限
  • 步骤二:设置用户使用自己的密码实现 sudo 提权

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

# vim /etc/sudoers

或者:

# visudo

添加以下内容:

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

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

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

# vim /etc/sudoers

或者:

# visudo

将以下内容:

......
#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 Post (中文帖子), 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

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

Logo (徽标):

Additional Information (其他信息):

About     Manual     Clone     Contact
Disclaimer     Friendly Links     Donation

关于     手册     克隆     联系
免责声明     友情链接     捐赠

Search Inside Website (站内搜索)

Search Outside Website (站外搜索):

Google         Wikipedia         Bing

Eternal URL (永恒网址):

https://eternity.eternalcenter.com Will be last access method / 将是最后的访问方式

Proudly powered by LNMP Proudly powered by WordPress