The officially official Devuan Forum!

You are not logged in.

#1 2018-03-03 23:35:47

leegold
Member
Registered: 2017-12-14
Posts: 12  

Help With Sudo and Asking For passwords When necessary

I did do:

# adduser devuan sudo

I do not know if this was necessary. But:

devuan@devuan:~$ sudo apt-get install etherape
[sudo] password for devuan:
devuan is not in the sudoers file.  This incident will be reported.

How do I use sudo?

also:

I want the "action" that if I open Synaptics Installer or click to open my windows partition devuan will ask for the password.

It is not doing that. It just opens Synaptics or takes me to window partition without asking for a password. I don't understand this. With a previous Devuan install if I ried anything it would ask for a password. New install it's not doing that now..

cat /etc/issue
Devuan GNU/Linux 1

Thanks

Offline

#2 2018-03-04 00:14:56

yeti
Member
Registered: 2017-02-23
Posts: 90  

Re: Help With Sudo and Asking For passwords When necessary

leegold wrote:

I did do:

# adduser devuan sudo

I do not know if this was necessary. But:

devuan@devuan:~$ sudo apt-get install etherape
[sudo] password for devuan:
devuan is not in the sudoers file.  This incident will be reported.

Group memberships are not added in realtime.

# adduser devuan sudo

...will not take effect in already running login shells. Logout, relogin and retry...

devuan@devuan:~$ sudo apt-get install etherape

If that wasn't a solution, we need more input...


"I have a natural instinct for science." — D.J. Trump
"There is no PLANET-B!" — ???
"Stay OmmmMMMmmmPtimistic!" — yeti

Offline

#3 2018-03-04 00:40:48

leegold
Member
Registered: 2017-12-14
Posts: 12  

Re: Help With Sudo and Asking For passwords When necessary

You're correct. Logging out then in and now sudo works. Thank you.

What about my second question if possible? Should I start a new thread? One reason I liked Devuan vs. other distros I tried is that it asked for passwords when I tried to access my Windows partition. But this new install does not. Also maybe related not matter what distro if I open the Synaptics Package Manager I'll get asked for the password. Strangely it just opens without a password. Previous install of Devuan asked for passwords in all cases, but it's not doing this now. I don't understand what changeed or how to fix it.

Offline

#4 2018-03-04 15:03:44

fsmithred
Administrator
Registered: 2016-11-25
Posts: 912  

Re: Help With Sudo and Asking For passwords When necessary

I don't have a good answer for your second question, but I have seen similar behavior - apps requiring root privileges either won't start from the menu or if the user is in the sudo group, those apps start without asking for password. Here's one of several discussions about it. To find more, search the forum for terms like policykit, polkit, consolekit, udisks, libpam.
https://dev1galaxy.org/viewtopic.php?id=675

One workaround would be to edit the .desktop files for the affected apps. For example, edit /usr/share/applications/synaptic.desktop and change
Exec=synaptic-pkexec
to
Exec=gksu synaptic
or something like
xterm -e 'su -c synaptic'

This might also work (please let me know if you try it.)
sudo synaptic

Offline

#5 2018-03-05 21:58:06

greenjeans
Member
Registered: 2017-04-07
Posts: 424  
Website

Re: Help With Sudo and Asking For passwords When necessary

Not for nothing, but some livecd's write a sudo-nopassword entry for the duration of the live session so the user can use everything freely, but doesn't delete that entry when you install it, it breaks pkexec, and pkexec being the POS it is, when it breaks it defaults to allowing program to open with no password.


https://sourceforge.net/projects/vuu-do/
Vuu-do GNU/Linux, minimal 64 and 32 bit Devuan-based openbox and mate systems to build on, maximal versions if you prefer your linux fully-loaded.

Please donate to support Devuan and init freedom! https://devuan.org/os/donate

Offline

#6 2018-03-05 22:29:28

leegold
Member
Registered: 2017-12-14
Posts: 12  

Re: Help With Sudo and Asking For passwords When necessary

I got the "action" I like. So open a program like Synaptic Package Manager and it overtly asks for password, same if I try to access my Windows partition that's conveniently added to the desktop- it asks for the PW.

During the install there's an install step that opens a window regarding sudo options (it's not the first window mentioning sudo - i.e. not the one early-on in the install [where I check that I want to use sudo] but about mid-way thru the install). If I remember it has 3 check boxes with one I think checked by default "sudo only for logout" or something like that is checked. I unchecked the default and checked the top-most 2 check boxes. Then I got that "action". Not sure exactly what configs checking those boxes invoked but it worked.

Offline

#7 2018-03-06 12:17:28

fsmithred
Administrator
Registered: 2016-11-25
Posts: 912  

Re: Help With Sudo and Asking For passwords When necessary

The first checkbox adds the primary user to the sudo group.
The second checkbox does the above and also disables the root password and edits two files in your home so that admin apps will ask for your user password instead of a root pass.

~/.gconf/apps/gksu/%gconf.xml
~/.su-to-rootrc

Offline

Board footer