ALT Linux Sisyphus discussions
 help / color / mirror / Atom feed
From: "\"Алексей Любимов\"" <avl@l14.ru>
To: sisyphus@altlinux.ru
Subject: Re: [sisyphus] poweroff и reboot от юзера.
Date: Wed, 19 Mar 2003 02:06:23 +0300
Message-ID: <20030319020623.67dd21c0.avl@l14.ru> (raw)
In-Reply-To: <20030318221143.GA24372@basalt.office.altlinux.org>

> > Плохо, потому что я так понял, выключаться питение не будет, как при /sbin/poweroff.
> > Еще плохо, что изменяется стандартная команда. То есть придется настраивать все программы, которые хотя выключать компьютер.
> 
> И как, интересно, /sbin/shutdown из-под пользователя выключит машину?
> Шутите?

нет. 

 If  shutdown  is  called  with  the  -a argument (add this to the invocation of
       shutdown in /etc/inittab), it checks to  see  if  the  file  /etc/shut-
       down.allow  is  present.  It then compares the login names in that file
       with the list of people that are logged in on a virtual  console  (from
       /var/run/utmp). Only if one of those authorized users or root is logged
       in, it will proceed. Otherwise it will write the message

       shutdown: no authorized users logged in

       to the (physical) system console. The format of /etc/shutdown.allow  is
       one user name per line. Empty lines and comment lines (prefixed by a #)
       are allowed. Currently there is a limit of 32 users in this file.

       Note that if /etc/shutdown.allow is not present,  the  -a  argument  is
       ignored.


я так понимаю, на нем должен стоять suid в таком варианте.



> > Остается только понять, как рещить эту проблему и какие настройки должны быть в программах, выключающих комп. Если команды выключения комп. меняются со стандартных /sbin/poweroff и /sbin/reboot на что либо другое, значит нужно написать враппер и договорится, где он будет лежать и как называться, чтобы прописать его в доке и не морочить себе голову проблемой, как выключить компьютер напрямую из гнома. 
> 
> Что это за новые чудеса? Неужели они работают?

кто они? у меня гном2 и рокс выключают компьютер, как положено, без перехода в gdm.
Но gnome-session пришлось пеесобрать, благо это несложно.


> 
> Вообще-то есть ещё пакет SysVinit-usermode.

смотрел я на него. Какая то странная вещь. Как ее использовать я так и не понял.

> 
> P.S. mailing list mismatch.

я вообще то целился на исправление gnome-session в сизифе. 

вызывать  sudo /sbin/poweroff как то неправильно имхо.
Нужно хотя бы проверить uid (может это рут), проверить возможность вызова sudo, другие варианты, если не сработает и положить такой враппер вместо /sbin/poweroff в идеале (если ничего ломаться не будет), чтобы эта функция работала для тех, кому она разрешена. 


  reply	other threads:[~2003-03-18 23:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-18 22:05 "Алексей Любимов"
2003-03-18 22:11 ` Dmitry V. Levin
2003-03-18 23:06   ` "Алексей Любимов" [this message]
2003-03-19 10:33     ` Dmitry V. Levin
2003-03-19 14:32       ` Alexey V. Lubimov

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=20030319020623.67dd21c0.avl@l14.ru \
    --to=avl@l14.ru \
    --cc=sisyphus@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 Sisyphus discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/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 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \
		sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru
	public-inbox-index sisyphus

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


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