is not in the sudoers file 解决(转)
解决 in The not is File sudoers
2023-09-14 08:59:55 时间
解决方案:
首需要切换到root身份
$su -
(注意有- ,这和su是不同的,在用命令"su"的时候只是切换到root,但没有把root的环境变量传过去,还是当前用户的环境变量,用"su -"命令将环境变量也一起带过去,就象和root登录一样)
然后
$visudo //切记,此处没有vi和sudo之间没有空格
1、移动光标,到最后一行
2、按a,进入append模式
3、输入
your_user_name ALL=(ALL) ALL
4、按Esc
5、输入“:w”(保存文件)
6、输入“:q”(退出)
这样就把自己加入了sudo组,可以使用sudo命令了。
相关文章
- [Android Pro] 完美解决 No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android
- 【异常】The dependencies of some of the beans in the application context form a cycle
- 【解决】oracle使用impdp导入数据库提示ORA-14460错误
- mysql中You can’t specify target table for update in FROM clause错误解决方法
- 解决Centos关闭You have new mail in /var/spool/mail/root提示
- 解决The type or namespace name 'XXXX' does not exist in the namespace 'XXXXXXXXX' 的错误
- 成功解决ValueError: Found unknown categories [20.5, 23.5, 30.5, 66.0, 71.0] in column 2 during transform
- 成功解决SyntaxError: (unicode error) ‘unicodeescape‘ codec can‘t decode bytes in position 6-7: malformed
- 成功解决pandas.errors.ParserError: Error tokenizing data. C error: Expected 1 fields in line 49, saw 2
- 成功解决MSB8020 The build tools for v141 (Platform Toolset = ‘v141‘) cannot be found. To build using the
- 成功解决UnicodeDecodeError: 'utf-8' codec can't decode byte 0x9a in position 0: invalid start byte
- 【异常】spring.factories机制解决外部配置文件无法被读取提示Field XXX in XXX that could not be found的问题
- 已解决:initialize specified but the data directory has files in it. Aborting
- 已解决FutureWarning: Conversion of the second argumecated. In future, it will be treated as `np.float64
- 已解决UnicodeEncodeError: ‘ascii‘ codec can‘t encode characters in position 18-20: ordinal not in range
- 已解决FutureWarning: As the xlwt package is no longer maintained, the xlwt engine will be removed in
- 已解决The method is not allowed for the requested URL.
- 已解决FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future
- 已解决EROR 1064 (42000): You have an error in. your SOL syntax. check the manual that corresponds to yo
- 已解决UnicodeDecodeError: ‘ascii‘ codec can‘t decode byte 0x8e in position 0: ordinal not in range(128)
- 问题解决:The connection to the server xxxxx:6443 was refused - did you specify the right host or port?
- 问题解决:Address already in use
- atitit.解决net.sf.json.JSONException There is a cycle in the hierarchy
- VC2015提示warning C4996: 'MBCS_Support_Deprecated_In_MFC': MBCS support in MFC is dep
- 解决办法:The name 'Response' does not exist in the current context
- Error(s) in loading state_dict for ResNet 问题解决
- C/C++: “error: stray ‘357’ in program“问题及其解决方法