Linux下创建超级用户

本文将指导您如何在Debian系统中创建一个新用户,并为其赋予sudo权限。通过这样做,您可以使用该用户账户执行管理命令,而无需以root用户身份登录Debian服务器。步骤包括登录服务器、创建新用户并将其添加到sudo组。
摘要由CSDN通过智能技术生成

As root edit /etc/sudoers and place the following line:

youruser    ALL=(ALL) NOPASSWD:ALL
after

# Allow members of group sudo to execute any command
%sudo   ALL=(ALL:ALL) ALL

 

以debian系统举例

搬运自https://linuxize.com/post/how-to-create-a-sudo-user-on-debian/

The sudo command (short for Super-user do) is a program designed to allow users to execute commands with the security privileges of another user, by default the root user.

In this guide, we will show you how to create a new user on a Debian system and give it sudo access.

You can use this user account to execute administrative commands without a need to log in to your Debian server as a root user.

Create a sudo user

Follow the steps below to

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值