导航:首页 > 程序命令 > linux命令adduser

linux命令adduser

发布时间:2024-07-16 23:16:03

1. linux如何设置用户权限

linux与用户权限设置:

1、添加用户
首先用adser命令添加一个普通用户,命令如下:

#adser tommy //添加一个名为tommy的用户
#passwd tommy //修改密码
Changing password for user tommy.
New UNIX password: //在这里输入新密码
Retype new UNIX password: //再次输入新密码
passwd: all authentication tokens updated successfully.

2、赋予root权限
方法一:修改 /etc/sudoers 文件,找到下面一行,把前面的注释(#)去掉
## Allows people in group wheel to run all commands
%wheel ALL=(ALL) ALL
然后修改用户,使其属于root组(wheel),命令如下:
#usermod -g root tommy
修改完毕,现在可以用tommy帐号登录,然后用命令 su - ,即可获得root权限进行操作。
方法二:修改 /etc/sudoers 文件,找到下面一行,在root下面添加一行,如下所示:
## Allow root to run any commands anywhere
root ALL=(ALL) ALL
tommy ALL=(ALL) ALL
修改完毕,现在可以用tommy帐号登录,然后用命令 su - ,即可获得root权限进行操作。

阅读全文

与linux命令adduser相关的资料

热点内容
android判断电话 浏览:162
如何删除安卓手机里的安装包 浏览:648
2021影视小程序源码激励广告 浏览:202
java编程培训机构 浏览:686
dtu源码资料zip 浏览:696
苹果6p是安卓的什么配置 浏览:56
语音通话降噪算法 浏览:474
pdf被加密不能打印 浏览:48
html内部服务器错误什么意思 浏览:768
加密金融风投是什么 浏览:1001
未来之翼为什么连接不了服务器 浏览:563
手动压缩喷雾器 浏览:654
linuxtimeval 浏览:703
煤气罐解压阀需要调紧吗 浏览:234
儿研所APP为什么没有耳鼻喉科 浏览:1000
androidapp界面素材 浏览:820
一台服务器主机建50台云桌面 浏览:605
手机解压了的图片 浏览:885
stm32闪存编程教程 浏览:515
javassh管理系统源码 浏览:7