首页 > 系统相关 >【linux常用命令】用户命令之useradd和sudoer

【linux常用命令】用户命令之useradd和sudoer

时间:2022-12-09 00:22:58浏览次数:68  
标签:linux sudoer 用户 123 useradd 常用命令

useradd

添加用户123
useradd 123

为用户123设置密码
passwd 123

sudoer

资料
https://www.cnblogs.com/yanling-coder/p/10947157.html

在root用户视图下执行命令
visudo

打开 /etc/sudoers 文件后

添加一行

123 ALL=(ALL) ALL

这样用户123就可以通过加前缀 sudo 而临时使用root权限执行命令了

标签:linux,sudoer,用户,123,useradd,常用命令
From: https://www.cnblogs.com/studentWangqy/p/16967802.html

相关文章

  • linux 中删除文件的最后几行
     001、[root@PC1test]#lsa.txt[root@PC1test]#cata.txt12345678910[root@PC1test]#head-n-3a.txt##删除最后3行1234567  0......
  • linux 中统计文件的行数,不显示文件名
     001、cat+wc-l[root@PC1test]#lsa.txt[root@PC1test]#cata.txt##测试文件12345678910[root@PC1test]#cata.txt|wc-l......
  • Linux安装ffmpeg
    使用的机器是Ubuntu18.04下载安装环境进入官网http://ffmpeg.org/点击Download,找到适用自身系统的下载包,我这里下载的Ubuntu-Officialpackages得到一个ffmpeg_x.x.x.......
  • linux中条件分支 逻辑而且 和 或者
     001、-a表示而且[root@PC1test]#a=5[root@PC1test]#b=10[root@PC1test]#if[$a-gt0-a$b-gt0];thenecho"yes";fi##-a表示逻辑而且,只有两......
  • linux 中 如何判断文件夹是否为空
     001、[root@PC1test]#ls[root@PC1test]#mkdirtest1test2##测试文件夹[root@PC1test]#echo"xxx">test2/a.txt[root@PC1test]#lste......
  • linux 中判断变量是否已经赋值
     001、[root@PC1test]#a=10[root@PC1test]#echo$a10[root@PC1test]#echo$b[root@PC1test]#[-z$a]##如果变量没有被赋值,则返回真,否则返回......
  • 期末复习-操作系统与linux管理
    liunx操作系统第一章操作系统引论p2-p51.什么是操作系统操作系统是管理和控制着计算机系统中的各种软硬件资源,合理地组织计算机的工作流程,为用户使用计算机提供接口......
  • linux 中判断文件是否为空
     001、[root@PC1test]#ls[root@PC1test]#toucha.txt##测试文件[root@PC1test]#seq6>b.txt##测试文件[root@PC1test]#ca......
  • Linux日志审计
    本文为joshua317原创文章,转载请注明:转载自joshua317博客 https://www.joshua317.com/article/291常用命令find、grep、egrep、awk、sedLinux中常见日志以及位置/v......
  • linux编译安装时常见错误解决办法
     linux编译安装时常见错误解决办法configure:error:xslt-confignotfound.Pleasereinstallthelibxslt>=1.1.0distribution复制代码代码如下:yum-yinstallli......