ubuntu-drivers should not run unless user is root

Bug #1920225 reported by Jeff Lane 
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-drivers-common (Ubuntu)
New
Undecided
Unassigned

Bug Description

one cannot install drivers unless one is root (or has root priv escalation via sudo).

For that reason, ubuntu-drivers should not run without a priv check.

ubuntu@doubletusk:~$ ubuntu-drivers --gpgpu autoinstall
This is gpgpu mode
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?

This shouldn't trigger the apt privilege error, ubuntu-drivers itself should check to see if it's running as root and then prompt the user.

Revision history for this message
Jeff Lane  (bladernr) wrote :
Download full text (4.4 KiB)

Even uglier traceback when trying to directly install the nvidia 470 server driver without using sudo:

ubuntu@polari:~$ ubuntu-drivers --gpgpu install nvidia:470-server
This is gpgpu mode
Traceback (most recent call last):
  File "/usr/bin/ubuntu-drivers", line 487, in <module>
    greet()
  File "/usr/lib/python3/dist-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3/dist-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3/dist-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3/dist-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/click/decorators.py", line 64, in new_func
    return ctx.invoke(f, obj, *args[1:], **kwargs) ...

Read more...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.