ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: Igor Vlasenko <vlasenko@imath.kiev.ua>
To: ALT Devel discussion list <devel@lists.altlinux.org>
Subject: Re: [devel] udev+pam_console for dynamic usb device
Date: Thu, 23 Aug 2007 17:02:39 +0300
Message-ID: <20070823140239.GA29391@dad.imath.kiev.ua> (raw)
In-Reply-To: <20070823114906.GA27350@dad.imath.kiev.ua>

On Thu, Aug 23, 2007 at 02:49:06PM +0300, Igor Vlasenko wrote:
> On Thu, Aug 23, 2007 at 12:16:16PM +0300, Igor Vlasenko wrote:
> > Уважаемые коллеги,
> > 
> > Собирая новый hplip, хочу убрать возникшие грабли с правами,
> > чтобы запускать утилиты из-под пользователя.
> > 
> > Имеем: udev создает устройства на имеющиеся принтеры 
> > /dev/bus/usb/куда/что/воткнуло.
> > с помощью udev.d/55-hpmud.rules я их добавляю в группу lp.
> > имеем права root.lp.
> > 
> > хочу с помощью pam_console сменить на <user>.lp.
> > 
> > Проблема в том, что имена не известны заранее,
> > а их hplip, как я понимаю, берет через libusb.
> > 
> > Как мне дать права пользователю?
> 
> Можно, конечно, обойтись и без pam_console, чистым udev.
> чем-то вроде
> PROGRAM="cat-if-exists /var/run/console/console.lock", USER="%c"
> но грабли наступят, когда пользователь перелогинится.

Впрочем, можно наплодить кучу симлинков вида /dev/hplip/printerBLABLA
и натравить на симлинки pam_console. 
Не пробовал, но должно сработать.

-- 

Dr. Igor Vlasenko
--------------------
Topology Department
Institute of Math
Kiev, Ukraine



      reply	other threads:[~2007-08-23 14:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-23  9:16 Igor Vlasenko
2007-08-23 11:07 ` Michael Shigorin
2007-08-23 11:11   ` Igor Vlasenko
2007-08-23 11:49 ` Igor Vlasenko
2007-08-23 14:02   ` Igor Vlasenko [this message]

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=20070823140239.GA29391@dad.imath.kiev.ua \
    --to=vlasenko@imath.kiev.ua \
    --cc=devel@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 Team development discussions

This inbox may be cloned and mirrored by anyone:

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

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


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