Skip to content

Eternal Center

  • System (系统)
  • Services (服务)
  • Databases (数据库)
  • Clusters (集群)
  • Big Data (大数据)
  • Cloud Computing (云计算)
  • Languages (语言)
  • Project (项目)
  • Writings (写作)
  • Eternity (永恒)
  • News (消息)
  • Chronicle (编年史)
  • Words (言)
Posted on January 15, 2022January 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

在

......
env_reset
......

这一行下面添加:

......
Defaults env_keep += "http_proxy https_proxy"
......

(补充:这里以允许用户在进行 sudo 提权的同时也能使用 http_proxy、https_proxy 为例)

CategoriesChinese (中文), System (系统), System Login Security (系统登录安全), System Network & System Security & System Log (系统网络 & 系统安全 & 系统日志), System Operation & System Setting & System Software (系统操作 & 系统设置 & 系统软件), System Privilege (系统权限), System Security (系统安全), System Setting (系统设置), System User & System Privilege (系统用户 & 系统权限)

Post navigation

Previous PostPrevious [命令] Linux 命令 iftop (显示系统联通状态)
Next PostNext 盾牌和铠甲

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