<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Linux Forum &mdash; Непонятка с sudo]]></title>
	<link rel="self" href="https://linuxforum.ru/extern.php?action=feed&amp;tid=8410&amp;type=atom" />
	<updated>2010-11-16T15:40:20Z</updated>
	<generator>PunBB</generator>
	<id>https://linuxforum.ru/viewtopic.php?id=8410</id>
		<entry>
			<title type="html"><![CDATA[Re: Непонятка с sudo]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=113703#p113703" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Vascom пишет:</cite><blockquote><p><strong>Cruiser78</strong>, ты файл с настройками и логи покажешь?</p></blockquote></div><p>пауза. форум не берет длинный текст.<br />-----------------------------<br />Всем спасибо. Решено. Решение в топикстартерном посте.</p>]]></content>
			<author>
				<name><![CDATA[Cruiser78]]></name>
				<uri>https://linuxforum.ru/profile.php?id=631</uri>
			</author>
			<updated>2010-11-16T15:40:20Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=113703#p113703</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Непонятка с sudo]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=113696#p113696" />
			<content type="html"><![CDATA[<p><strong>Cruiser78</strong>, ты файл с настройками и логи покажешь?</p>]]></content>
			<author>
				<name><![CDATA[Vascom]]></name>
				<uri>https://linuxforum.ru/profile.php?id=5339</uri>
			</author>
			<updated>2010-11-16T15:23:09Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=113696#p113696</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Непонятка с sudo]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=113692#p113692" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>drBatty пишет:</cite><blockquote><p>&nbsp; &nbsp; &nbsp; &nbsp;By default, if the NOPASSWD tag is applied to any of the entries for a user on the current host, he or she<br />&nbsp; &nbsp; &nbsp; &nbsp;will be able to run sudo -l without a password. <br />может в этом дело?</p></blockquote></div><p>Да не запускает оно ничего с ключом -l (у меня). Только команду на терминал выводит, типа echo...</p>]]></content>
			<author>
				<name><![CDATA[Cruiser78]]></name>
				<uri>https://linuxforum.ru/profile.php?id=631</uri>
			</author>
			<updated>2010-11-16T15:17:16Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=113692#p113692</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Непонятка с sudo]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=113664#p113664" />
			<content type="html"><![CDATA[<p>ну вот моя строчка:<br /></p><div class="codebox"><pre><code>doc ALL = NOPASSWD: /usr/bin/lsof -i -r 3</code></pre></div><p>она 100% рабочая.<br />только я имя пользователя ставлю. а не группы. может в этом дело?</p><p>вот что пишет мой мануал:<br /></p><div class="quotebox"><blockquote><p>Note, however, that the PASSWD tag has no effect on users who are in the group specified by the<br />&nbsp; &nbsp; &nbsp; &nbsp;exempt_group option.</p><p>&nbsp; &nbsp; &nbsp; &nbsp;By default, if the NOPASSWD tag is applied to any of the entries for a user on the current host, he or she<br />&nbsp; &nbsp; &nbsp; &nbsp;will be able to run sudo -l without a password.&nbsp; Additionally, a user may only run sudo -v without a<br />&nbsp; &nbsp; &nbsp; &nbsp;password if the NOPASSWD tag is present for all a user&#039;s entries that pertain to the current host.&nbsp; This<br />&nbsp; &nbsp; &nbsp; &nbsp;behavior may be overridden via the verifypw and listpw options.</p></blockquote></div><p>может в этом дело?</p>]]></content>
			<author>
				<name><![CDATA[drBatty]]></name>
				<uri>https://linuxforum.ru/profile.php?id=86</uri>
			</author>
			<updated>2010-11-16T13:58:43Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=113664#p113664</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Непонятка с sudo]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=113660#p113660" />
			<content type="html"><![CDATA[<p>Покажи тогда нам весь файл /etc/sudoers. Покажи команду, которую ты вводишь и что получаешь в ответ.</p>]]></content>
			<author>
				<name><![CDATA[Vascom]]></name>
				<uri>https://linuxforum.ru/profile.php?id=5339</uri>
			</author>
			<updated>2010-11-16T13:51:58Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=113660#p113660</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Непонятка с sudo]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=113659#p113659" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>drBatty пишет:</cite><blockquote><p>убиваться не надо, надо юзать <strong>visudo</strong>, она синтаксис проверяет.<br />и файл должен заканчиваться пустой строкой.</p></blockquote></div><p>Именно через visudo (о чем и специально отметил в топикстартовом письме,&nbsp; и редактирую настройку. И файл пустой строкой заканчивается.&nbsp; Это первое, что я проверил. </p><p>Хотел через expect скриптик сделать... Так он, сволочь, пишет что не хочет команду sudo поддерживать...Для <br />Для меня&nbsp; главное - отучить sudo от ввода пароля.</p>]]></content>
			<author>
				<name><![CDATA[Cruiser78]]></name>
				<uri>https://linuxforum.ru/profile.php?id=631</uri>
			</author>
			<updated>2010-11-16T13:47:52Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=113659#p113659</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Непонятка с sudo]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=113652#p113652" />
			<content type="html"><![CDATA[<p>Строка, которую я указал 100% должна работать. Что-то ты пишешь не так или не туда.</p>]]></content>
			<author>
				<name><![CDATA[Vascom]]></name>
				<uri>https://linuxforum.ru/profile.php?id=5339</uri>
			</author>
			<updated>2010-11-16T13:36:54Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=113652#p113652</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Непонятка с sudo]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=113653#p113653" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Cruiser78 пишет:</cite><blockquote><p>делал. И вместо localhost ALL вписывал, и имя этого хоста по hostname. И имя конретного юзера вместо группы....<br />Просит пароль, хоть убейся...</p></blockquote></div><p>убиваться не надо, надо юзать <strong>visudo</strong>, она синтаксис проверяет.<br />и файл должен заканчиваться пустой строкой.</p>]]></content>
			<author>
				<name><![CDATA[drBatty]]></name>
				<uri>https://linuxforum.ru/profile.php?id=86</uri>
			</author>
			<updated>2010-11-16T13:36:54Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=113653#p113653</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Непонятка с sudo]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=113650#p113650" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Vascom пишет:</cite><blockquote><p>Сделай<br /></p><div class="codebox"><pre><code>имя_пользователя        ALL=(ALL)       NOPASSWD: ALL</code></pre></div><p>У меня так работает. А у тебя?</p></blockquote></div><p>А у меня нет.</p><p>пишет:</p><p><div class="termtitle" style="font-family: sans-serif; position:relative; height:auto; width:auto; background:#3A4061; color:#FFFFFF; padding: 1px;"><b> Консоль:</b></div>
<div class="termcont" style="font-family: Terminus; position:relative; height:auto; width:auto; overflow-x:scroll; white-space: nowrap ; overflow-y:auto;background:#000000; color:#4EF44E; line-height:1.2; padding: 3px; font-size: 1rem; max-height: 60vh">[sudo] pasword for username:</div></p><p>А далее - введешь пароль, он продержится (как прописано в доках) несколько минут. В это время можно работать безпарольно. Это понятно. Непонятно, как отучить sudo пароль запрашивать вообще. У меня по постановке задачи все вообще должно идти в фоне, как подготовка к запуску VLC...</p>]]></content>
			<author>
				<name><![CDATA[Cruiser78]]></name>
				<uri>https://linuxforum.ru/profile.php?id=631</uri>
			</author>
			<updated>2010-11-16T13:35:17Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=113650#p113650</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Непонятка с sudo]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=113646#p113646" />
			<content type="html"><![CDATA[<p>Сделай<br /></p><div class="codebox"><pre><code>имя_пользователя        ALL=(ALL)       NOPASSWD: ALL</code></pre></div><p>У меня так работает. А у тебя?</p>]]></content>
			<author>
				<name><![CDATA[Vascom]]></name>
				<uri>https://linuxforum.ru/profile.php?id=5339</uri>
			</author>
			<updated>2010-11-16T13:22:32Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=113646#p113646</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Непонятка с sudo]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=113644#p113644" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Vascom пишет:</cite><blockquote><p>Может пробел после NOPASSWD:</p></blockquote></div><p>делал. И вместо localhost ALL вписывал, и имя этого хоста по hostname. И имя конретного юзера вместо группы....<br />Просит пароль, хоть убейся...</p>]]></content>
			<author>
				<name><![CDATA[Cruiser78]]></name>
				<uri>https://linuxforum.ru/profile.php?id=631</uri>
			</author>
			<updated>2010-11-16T13:18:49Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=113644#p113644</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Непонятка с sudo]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=113642#p113642" />
			<content type="html"><![CDATA[<p>Может пробел после NOPASSWD:</p>]]></content>
			<author>
				<name><![CDATA[Vascom]]></name>
				<uri>https://linuxforum.ru/profile.php?id=5339</uri>
			</author>
			<updated>2010-11-16T13:14:48Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=113642#p113642</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Непонятка с sudo]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=113631#p113631" />
			<content type="html"><![CDATA[<p>Привет всем!</p><p>Дано RFRemix-14.</p><p>Глобальная цель - научить VLC устойчиво играть IPTV на ноутбуке. Ноут имеет особенность - он может быть включен или в проводное соединение (eth0), или к WiFi (wlan0). Соответственно, перед запуском VLC разбираем, куда именно воткнут ноут и перенапрявляем мултикастный поток на нужный интерфейс.&nbsp; Если этого не делать, то VLC работает неустойчиво.&nbsp; Однако, для того, чтобы задействовать комaнду ip... нужны рутовые полномочия. Или - по sudo ввод пароля рута. Юзеру это сто раз не надо. Решение - прописываем (используя visudo) в sudoers строчку:</p><div class="codebox"><pre><code>%users localhost=NOPASSWD:/sbin/ip</code></pre></div><p>Вводим юзера в группу users... И никакой реакции. Пароль sudo как спрашивало, так и спрашивает... Я даже ноут перезагружал... Что я неправильно делаю?</p><p>===========================<br />Всем спасибо. Все советы были правильны. И я тоже делал всё правильно. Кроме одной мелочи. При заведении юзера я согласился с предложением дать ему право делать sudo. При этом firsboot (или как его) сделал в каталоге /etc/sudoers.d файл с именем юзера со следущим содержимым</p><div class="codebox"><pre><code>username ALL=(ALL) ALL</code></pre></div><p>Оказывается поведение sudo такое, что данное содержимое перебивает все остальные, более частные, настройки. Настройки, которые уточняют этот ALL для конкретных случаев. Удалил файл - всё заработало как и хотел.</p>]]></content>
			<author>
				<name><![CDATA[Cruiser78]]></name>
				<uri>https://linuxforum.ru/profile.php?id=631</uri>
			</author>
			<updated>2010-11-16T12:53:12Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=113631#p113631</id>
		</entry>
</feed>
