public inbox for gentoo-user-ru@lists.gentoo.org
 help / color / mirror / Atom feed
From: Mad Deer <mad-deer@mail.ru>
To: gentoo-user-ru@lists.gentoo.org
Subject: Re: [gentoo-user-ru] root->user
Date: Wed, 23 Apr 2008 01:15:07 +0400	[thread overview]
Message-ID: <480E555B.9020509@mail.ru> (raw)
In-Reply-To: <20080422201521.GC1841@home.power>

Alex Efros пишет:
>     su - USER -c 'COMMAND'
>     sudo -u USER bash -c 'COMMAND'
>     setuidgid USER bash -c 'COMMAND'
>     chpst -u USER bash -c 'COMMAND'
> 
как на счёт sudo -u USER bash -c '. /etc/profile; COMMAND'
или в особо сложных случаях sudo -u USER bash -c '. ~/.bashrc; COMMAND'
пропробуй в /etc/sudoers закоментить "Defaults env_reset" она сбрасывает переменые

а вообще чем такие сложные построения выполнять проще именно со скриптом


-- 
Да здравствует то, благодаря чему мы, несмотря ни на что.(c) Задорнов
Registered Linux User #317544
Linux 2.6.24-gentoo-r5 i686 AMD Athlon(tm) 64 X2 Dual Core Processor 5000+



  parent reply	other threads:[~2008-04-22 21:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-22 20:15 [gentoo-user-ru] root->user Alex Efros
2008-04-22 21:06 ` Andrey Vasyutchenko
2008-04-22 21:23   ` Alex Efros
2008-04-22 21:15 ` Mad Deer [this message]
2008-04-22 21:31   ` Alex Efros

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=480E555B.9020509@mail.ru \
    --to=mad-deer@mail.ru \
    --cc=gentoo-user-ru@lists.gentoo.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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox