sudo is the command that allows you run some commands using other login, without switch user at first. Of cousre, you need to tip the corresponding password. For exmple
To see the boot log, you need to be root. But sometimes even the correct password is given, you still got the following error message.
[sudo] password for user:
user is not in the sudoers file. This incident will be reported.
Error message is self-exlained. You need to edit sudoers file, which is located at "/etc/sudoers". As root, you can edit the file by
- >vis /etc/sudoers
- Add "user ALL=(ALL) ALL" into it
Now sudo should work. /etc/sudoers is very powerful to manange which user can run which program. See more tricks in "
sudoers file".
No comments:
Post a Comment