ubuntu中如果新创建的用户在操作一些文件提示
用户名 is not in the sudoers file. This incident will be reported.
说明该用户不具备权限操作
1、切换到能使用root权限的用户
使用root权限修改sudoers文件
vim /etc/sudoers
添加一行
your_username ALL=(ALL) ALL

:wq!保存,要加!,因为是只读,所以要强制保存。
保存后就可以切换回用户权限操作文件了。
本文介绍在Ubuntu系统中如何为新创建的用户分配sudo权限,通过编辑sudoers文件,使用户能够执行需要root权限的操作。
ubuntu中如果新创建的用户在操作一些文件提示
用户名 is not in the sudoers file. This incident will be reported.
说明该用户不具备权限操作
1、切换到能使用root权限的用户
使用root权限修改sudoers文件
vim /etc/sudoers
添加一行
your_username ALL=(ALL) ALL

:wq!保存,要加!,因为是只读,所以要强制保存。
保存后就可以切换回用户权限操作文件了。
4490
651
301
4万+
7626

被折叠的 条评论
为什么被折叠?