The Short answer
- You killed your
/etc/sudoers - Verify the Integrity´with
visudo -c
The Long Answer:
Default Sudo File
(In case you want to overwrite your one)
## Default Debian `/etc/sudoers` # # This file MUST be edited with the 'visudo' command as root. # # Please consider adding local content in /etc/sudoers.d/ instead of # directly modifying this file. # # See the man page for details on how to write a sudoers file. # Defaults env_reset Defaults mail_badpass Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" # Host alias specification # User alias specification # Cmnd alias specification # User privilege specification root ALL=(ALL:ALL) ALL # Allow members of group sudo to execute any command %sudo ALL=(ALL:ALL) ALL # See sudoers(5) for more information on "#include" directives: #includedir /etc/sudoers.d
Use "visudo"
Manpage visudo
visudo edits the sudoers file in a safe fashion, analogous to vipw(8).
visudo locks the sudoers file against multiple simultaneous edits, provides basic sanity checks, and checks for parse errors.
If the sudoers file is currently being edited you will receive a message to try again later.
visudo parses the sudoers file after editing and will not save the changes if there is a syntax error. Upon finding an error, visudo will print a message stating the line number(s) where the error occurred and the user will receive the “What now?” prompt. At this point the user may enter ‘e’ to re-edit the sudoers file, ‘x’ to exit without saving the changes, or ‘Q’ to quit and save changes.
The ‘Q’ option should be used with extreme caution because if visudo believes there to be a parse error, so will sudo and no one will be able to run sudo again until the error is fixed.
If ‘e’ is typed to edit the sudoers file after a parse error has been detected, the cursor will be placed on the line where the error occurred (if the editor supports this feature).
Howto get Password-Less Sudo User?
- YOUR_USERNAME_HERE ALL=(ALL) NOPASSWD: ALL
Howto get Password-Less Sudo Group?
Conclusion
Dont edit the sudo file on your own, if you are unfamilar with the Syntax.
sudousually needs your accounts' password. Why do you usesudo -ithough?sudomeanssu do, which in most cases means:superuser/root do. You - normally - don't need the-iswitch, you use it in conjunction with your needed command, e. g.:sudo apt-get update, or whatever. How did you add your user to sudoers?