From: "Canek Peláez Valdés" <caneko@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] How to grant a CAP_NET_RAW capability to user?
Date: Tue, 10 Dec 2013 12:39:30 -0600 [thread overview]
Message-ID: <CADPrc80ZbUExn7CFq-g5dVY6erT2PwL-jbPTTZfDMNB_1D0TFw@mail.gmail.com> (raw)
In-Reply-To: <l87lqe$7p1$1@ger.gmane.org>
From man:capabilities(7): "Capabilities are a per-thread attribute."
I don't think you can grant any capability to a user. A workaround for
what you want is to write a little executable that only execvp's bash
(or whatever shell you use), grant that executable CAP_NET_RAW, and
then set it as default shell with usermod.
Regards.
On Tue, Dec 10, 2013 at 12:16 PM, Grant Edwards
<grant.b.edwards@gmail.com> wrote:
> How do you grant a capability (e.g. CAP_NET_RAW) to a user?
>
> I've been googling and have found countless articles and blog posts
> explaining what each capability is and how to grant capabilities to an
> executable file. While granting the capability to an executable does
> work, that's not what I need to do for a couple different reasons.
>
> I need to grant the capability to a user, not to the executable.
>
> There were a couple vague references implying that you can configure
> "login to grant the desired capabilities" when a user logs in, but
> I've not found any documentation on how to do that.
>
> I've tried editing /etc/security/capability.conf and adding the line
>
> cap_net_raw <username>
>
> But, that doesn't seem to have any effect (yes, I logged out and back
> in again).
>
> --
> Grant Edwards grant.b.edwards Yow! Mary Tyler Moore's
> at SEVENTH HUSBAND is wearing
> gmail.com my DACRON TANK TOP in a
> cheap hotel in HONOLULU!
>
>
--
Canek Peláez Valdés
Posgrado en Ciencia e Ingeniería de la Computación
Universidad Nacional Autónoma de México
next prev parent reply other threads:[~2013-12-10 18:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-10 18:16 [gentoo-user] How to grant a CAP_NET_RAW capability to user? Grant Edwards
2013-12-10 18:39 ` Canek Peláez Valdés [this message]
2013-12-10 18:56 ` [gentoo-user] " Grant Edwards
2013-12-10 19:40 ` Canek Peláez Valdés
2013-12-10 20:07 ` Grant Edwards
2013-12-10 19:39 ` Grant Edwards
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=CADPrc80ZbUExn7CFq-g5dVY6erT2PwL-jbPTTZfDMNB_1D0TFw@mail.gmail.com \
--to=caneko@gmail.com \
--cc=gentoo-user@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