From: Mikhail Zabaluev <mhz@alt-linux.org>
To: mandrake-russian@altlinux.ru
Subject: [mdk-re] Re: перезагрузка, выключение ипрочее.
Date: Fri Jul 20 00:35:11 2001
Message-ID: <20010720005605.E2498@localhost.localdomain> (raw)
In-Reply-To: <01071923365003.13345@pif.b5.mephi.ru>; from serpiph@pochtamt.ru on Thu, Jul 19, 2001 at 11:36:50PM +0400
Hello Sergei,
On Thu, Jul 19, 2001 at 11:36:50PM +0400, Sergei wrote:
>
> Среда 18 Июль 2001 23:11, Вы написали:
> > А нельзя ли сделать так чтобы просто набрать poweroff и все?
> Можно! И даже с паролем того человека, кто эту команду набрал и с разрешением
> только одним людям. А именно:
> 1. поставить пакет usermode
> 2. создать ссылку poweroff на /usr/bin/consolehelper
> 3. создать файл /etc/security/console.app/poweroff:
> USER=<user>
> PROGRAM=/sbin/poweroff
> SESSION=false
> FALLBACK=false
> 4. создать файл /etc/pam.d/poweroff:
> #%PAM-1.0
> auth sufficient /lib/security/pam_rootok.so
> auth required /lib/security/pam_listfile.so item=user sense=allow
> file=/etc/power.operator onerr=fail
> auth required /lib/security/pam_console.so
> auth required /lib/security/pam_stack.so service=system-auth
> account required /lib/security/pam_permit.so
> 5. создать файл /etc/power.operator с именами разрешенных пользователей по
> одному на строчке.
>
> И все. Пользуйтесь!
Может быть, проще сделать
alias poweroff='sudo poweroff'
в .bashrc (или в .bash_profile, чтобы только в login shell работало)?
--
Stay tuned,
MhZ JID: mookid@jabber.org
___________
Zounds! I was never so bethumped with words
since I first called my brother's father dad.
-- William Shakespeare, "Kind John"
next prev parent reply other threads:[~2001-07-20 0:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-07-18 17:32 [mdk-re] перезагрузка,выключение ипрочее Alex A. Puchkov
2001-07-18 17:47 ` [mdk-re] перезагрузка, выключение и прочее cornet
2001-07-19 22:20 ` [mdk-re] перезагрузка,выключение ипрочее Alex A. Puchkov
2001-07-19 23:09 ` [mdk-re] Re: [mdk-re] перезагрузка, выключение ипрочее Sergei
2001-07-20 0:35 ` Mikhail Zabaluev [this message]
2001-07-20 10:02 ` [mdk-re] перезагрузка, выключение и прочее cornet
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=20010720005605.E2498@localhost.localdomain \
--to=mhz@alt-linux.org \
--cc=mandrake-russian@altlinux.ru \
/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