ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: "Dmitry V. Levin" <ldv@altlinux.org>
To: ALT Linux general discussion list <community@lists.altlinux.org>
Subject: Re: [Comm] sudo и прочее
Date: Thu, 11 Oct 2007 05:23:13 +0400
Message-ID: <20071011012313.GA4157@basalt.office.altlinux.org> (raw)
In-Reply-To: <ba1d1820710101047p5147cfdby10e8cb0f69ec3478@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1072 bytes --]

On Wed, Oct 10, 2007 at 08:47:21PM +0300, Alexander Solovyov wrote:
> On 10/10/07, Dmitry V. Levin wrote:
> > > > Проверьте, как у вас определена переменная среды SHELL.
> > >
> > > piranha@scighera ~>env|g SHELL
> > > SHELL=/bin/zsh
> > > piranha@scighera ~>sudo -s
> > > root@scighera /home/piranha # env|grep SHELL
> > > SHELL=/bin/zsh
> > >
> > > Последняя строка - это уже запущенный рутовский bash.
> >
> > Почему вы решили что это bash?
> 
> Каюсь, таки zsh. Решил потому, что prompt точно такой же, как и у
> баша, который был при первом входе в систему.

Вот видите, всё оказалось более чем предсказуемо.

> > Что у вас получится если запустить
> > $ SHELL=/bin/pwd sudo -s
> > ?
> 
> Всё ок, показывает текущую директорию.
> 
> Т.е. теперь вопрос стоит так - почему он не берёт мои конфиги? Т.е.
> почему $HOME оказывается в /root.

sudo собран с --enable-shell-sets-home, т.е. в режиме
set $HOME to target user in shell mode.

В sudoers(5) есть переменная set_home, с помощью которой это умолчание
можно изменить.


-- 
ldv

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2007-10-11  1:23 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-09 12:10 Alexander Solovyov
2007-10-09 12:17 ` Алексей Шенцев
2007-10-09 12:29   ` Alexander Solovyov
2007-10-09 12:56 ` Damir Shayhutdinov
2007-10-10  7:49   ` Alexander Solovyov
2007-10-10  5:32 ` Timur Batyrshin
2007-10-10  7:47   ` Alexander Solovyov
2007-10-10 11:23 ` Michael Shigorin
2007-10-10 13:35   ` Alexander Solovyov
2007-10-10 13:37     ` Michael Shigorin
2007-10-10 13:57   ` Dmitry V. Levin
2007-10-10 14:04     ` Alexander Solovyov
2007-10-10 17:17       ` Dmitry V. Levin
2007-10-10 17:47         ` Alexander Solovyov
2007-10-11  1:23           ` Dmitry V. Levin [this message]
2007-10-11  8:21             ` Alexander Solovyov
2007-10-12  0:03               ` Dmitry V. Levin
2007-10-12  5:25                 ` Alexander Solovyov
2007-10-15 13:58                 ` Michael Shigorin
2007-10-15 16:17                   ` Dmitry V. Levin
2007-10-15 16:26                     ` [Comm] [JT] " Michael Shigorin
2007-10-15 18:05                       ` Alexander Solovyov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071011012313.GA4157@basalt.office.altlinux.org \
    --to=ldv@altlinux.org \
    --cc=community@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Community general discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
		mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
	public-inbox-index community

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.community


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git