ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: Sergei <serpiph@pochtamt.ru>
To: mandrake-russian@altlinux.ru
Subject: [mdk-re] Re: [mdk-re] перезагрузка, выключение ипрочее.
Date: Thu Jul 19 23:09:00 2001
Message-ID: <01071923365003.13345@pif.b5.mephi.ru> (raw)
In-Reply-To: <01071823110101.01673@alex>

Среда 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 с именами разрешенных пользователей по 
одному на строчке.

И все. Пользуйтесь!

-- 
С уважением, Епифанов Сергей.



  reply	other threads:[~2001-07-19 23:09 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     ` Sergei [this message]
2001-07-20  0:35       ` [mdk-re] Re: перезагрузка, выключение ипрочее Mikhail Zabaluev
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=01071923365003.13345@pif.b5.mephi.ru \
    --to=serpiph@pochtamt.ru \
    --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