Unix & Linux: adding a sudoer in debian (4 Solutions!!)
Unix & Linux: adding a sudoer in debian
The Question: After a long search on the web, trying everything I can find I came to ask you
guys, how can I add an existing user to be a sudoer?
I've tried
usermod -a -G sudo user
and also
adduser user
both while in root... the first one didn't work at all and the second one
supposedly added 'user' to sudoers but when I try to run sudo with that user it
says: user is not in the sudoers file. This incident will be reported.
When I run adduser again, it says the user 'user' is already a member of
'sudo'.
what can I do???
-EDIT: for clarification, I do want the user to be prompted for a password when
trying to run sudo. currently when the user is running sudo he is being
prompted for a password and then he gets "user is not in sudoers file...." I
wand him to be able to run sudo, be prompted and then escalate the privilege.
Solutions: Please watch the whole video to see all solutions, in order of how many people found them helpful
== This solution helped 13 people ==
As root edit /etc/sudoers and place the following line:
youruser ALL=(ALL) NOPASSWD:ALL
after
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
In this way you will be capable to execute all commands that require sudo
privileges passwordless.
In order to use sudo and be prompted for a password you need to remove
NOPASSWD:ALL
== This solution helped 11 people ==
Following command is correct and enough but you need to completely logout the
user and relogin to work .
usermod -a -G sudo user
== This solution helped 2 people ==
In addition, in Debian if it doesn't work you need to install sudo package:
apt install sudo
Then you should have /etc/sudoers file and proceed as follows:
usermod -a -G sudo user
With thanks & praise to God, and with thanks to the many people who have made this project possible! | Content (except music & images) licensed under cc by-sa 3.0 | Music: https://www.bensound.com/royalty-free-music | Images: https://stocksnap.io/license & others | With thanks to user winklerrr (https://unix.stackexchange.com/users/224262), user ValarMorghulis (https://unix.stackexchange.com/users/176814), user Omid Kosari (https://unix.stackexchange.com/users/36558), user kemotep (https://unix.stackexchange.com/users/276845), user Ivan P (https://unix.stackexchange.com/users/177075), user azertykitty (https://unix.stackexchange.com/users/316301), user Archemar (https://unix.stackexchange.com/users/79818), and the Stack Exchange Network (http://unix.stackexchange.com/questions/292562). Trademarks are property of their respective owners. Disclaimer: All information is provided "AS IS" without warranty of any kind. You are responsible for your own actions. Please contact me if anything is amiss at Roel D.OT VandePaar A.T gmail.com.
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Unix & Linux: adding a sudoer in debian (4 Solutions!!)», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.