Re: nvme as user?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 2023-10-29 at 04:06 -0700, ToddAndMargo via users wrote:
> On 10/29/23 04:02, Patrick O'Callaghan wrote:
> > On Sat, 2023-10-28 at 15:56 -0700, ToddAndMargo via users wrote:
> > > > > $ doas -u root "nvme smart-log /dev/nvme0n1"
> > > > > doas: Operation not permitted
> > > > 
> > > > Try removing the quotes.
> > > > 
> > > > poc
> > > 
> > > $ doas -u root nvme smart-log /dev/nvme0n1
> > > doas: Operation not permitted
> > 
> > Does doas ask for your password (you as a user, not root)?
> > 
> > What happens when you use sudo (or 'su -c' - note that in this case
> > you'll need the quotes)?
> > 
> > What happens if use:
> >         doas nvme ...
> > i.e. without the '-u root' (since root is the default).
> > 
> > poc
> 
> 
> I am trying to get the information without having
> to be root.  And it does not have to come from the
> nvme command either.
> 
> My goal is to do a libnotify popup when I log
> into my desktop

If the nvme command requires root, it requires root (presumably because
of the direct access to the device).

The point of 'doas' or 'su' or 'sudo' is to get root temporarily for
the duration of the command. The question here is why is it failing,
and the answer is most likely "because you're doing it wrong". That's
why I'm asking what happens when you run those various alternatives. My
guess is that you have to enable your user via the doas.conf(5) config
file.

I can run doas without issue and have never edited doas.conf. However I
am a member the 'wheel' group, which the default doas.conf does enable:

$ cat /etc/doas.conf 
# Allow wheel by default
permit :wheel

So I suggest you try as a member of the wheel group and see what
happens.

poc
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux