SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2012-01-08 22:23:41

Ozitraveller
#! Junkie
From: Far from the madding crowd!
Registered: 2011-04-26
Posts: 257

[SOLVED ]Help with sudo

Hi All

I creating a script, for my own interest, the first image is from a standard #! xfce install. Dialog with password only. The second image is from the install from my script and again xfce. Dialog with password, remember password checkbox, and then 2 radio buttons.

My question is, what do I need to do to remove the remember password, and radio buttons?

Does anyone what causes this to happen?

Regards

Root%20permission%201.png

Root%20permission%202.png

Last edited by Ozitraveller (2012-01-29 19:43:43)

Offline

Be excellent to each other!

#2 2012-01-08 22:27:46

dubois
The Old Codger
Registered: 2010-09-03
Posts: 2,238

Re: [SOLVED ]Help with sudo

The second is a Debian image.  That's the way my Debian netinstalls of Xfce always look.


EDIT -- as configured in the second image it should remember your password for either of those two lengths of time -- I've found it to be something you can get used to instead of having to enter your password repeatedly, especially irksome if you are only user.  Don't know how to change it or get rid of it though...

Last edited by dubois (2012-01-08 22:32:23)

Offline

#3 2012-01-08 23:23:42

Ozitraveller
#! Junkie
From: Far from the madding crowd!
Registered: 2011-04-26
Posts: 257

Re: [SOLVED ]Help with sudo

Thanks Dubios for your input and it is from a debian netinstall of xfce. I would rather it asked me each time though.

smile

Offline

#4 2012-01-08 23:31:37

dubois
The Old Codger
Registered: 2010-09-03
Posts: 2,238

Re: [SOLVED ]Help with sudo

The only thing I can think of, and this is a guess, is not to <check> either button so it continues to ask but like I said, no idea how to change it.  Best to you in this...

Offline

#5 2012-01-08 23:48:51

Ozitraveller
#! Junkie
From: Far from the madding crowd!
Registered: 2011-04-26
Posts: 257

Re: [SOLVED ]Help with sudo

Yes that's the way I'm running this at the moment "unchecked" smile

It's working in #!, so I'm hoping maybe corenomial or some else that worked on #!, might be able to shed some light on it.

Thanks Dubois.

Offline

#6 2012-01-09 13:22:12

kowloonboy
#! Junkie
Registered: 2011-10-13
Posts: 443

Re: [SOLVED ]Help with sudo

Have you try create a new user? See if you get the radio button for the new user.


"To me, the extraordinary aspect of martial arts lies in its simplicity. The easy way is also the right way, and martial arts is nothing at all special; the closer to the true way of martial arts, the less wastage of expression there is." - Bruce Lee

Offline

#7 2012-01-09 15:24:15

Thorny
#! CrunchBanger
Registered: 2011-05-19
Posts: 113

Re: [SOLVED ]Help with sudo

Ozitraveller wrote:

...
Does anyone what causes this to happen?
...

To me that looks like the difference between:

gksudo synaptic

and

su-to-root -X -c synaptic

Offline

#8 2012-01-09 15:32:35

pvsage
Internal Affairs
From: North Carolina
Registered: 2009-10-18
Posts: 12,508

Re: [SOLVED ]Help with sudo

^ I jut tried `su-to-root -X -c gparted` in Statler; still no tickbox or radidio buttons.


I'm a moderator here.  How are we doing?  Feedback is encouraged.

Offline

#9 2012-01-09 19:02:30

Thorny
#! CrunchBanger
Registered: 2011-05-19
Posts: 113

Re: [SOLVED ]Help with sudo

I'm going to choose to believe you as I'm on a squeeze system. Here on squeeze, gksudo does not have the checkbox or radio controls. And, because I'm using a Gnome desktop, su-to-root -X works out as gksu, which does have the checkbox and radio buttons.

Offline

#10 2012-01-09 20:30:16

Ozitraveller
#! Junkie
From: Far from the madding crowd!
Registered: 2011-04-26
Posts: 257

Re: [SOLVED ]Help with sudo

Thanks guys that's very interesting.

Yes I'm using squeeze and xfce.

I did a debian netinstall xfce from the advanced options and this also has the tickbox and radio buttons.

I'll do some further investigation.

Offline

#11 2012-01-09 21:56:18

pvsage
Internal Affairs
From: North Carolina
Registered: 2009-10-18
Posts: 12,508

Re: [SOLVED ]Help with sudo

@Thorny:  I've tried gksu as well; also no tickbox or radio buttons.  Maybe Philip has gksu aliased to gksudo?


I'm a moderator here.  How are we doing?  Feedback is encouraged.

Offline

#12 2012-01-09 23:14:13

Ozitraveller
#! Junkie
From: Far from the madding crowd!
Registered: 2011-04-26
Posts: 257

Re: [SOLVED ]Help with sudo

This is from #!

XXXXX     1476     1  0 08:09 ?        00:00:00 xfwm4
XXXXX     1478     1  0 08:09 ?        00:00:00 xfce4-panel
XXXXX     1480     1  0 08:09 ?        00:00:00 Thunar --daemon
XXXXX     1482     1  1 08:09 ?        00:00:01 xfdesktop
XXXXX     1492     1  0 08:09 ?        00:00:00 xscreensaver -no-splash
XXXXX     1503     1  0 08:09 ?        00:00:00 xfsettingsd
XXXXX     1505     1  1 08:09 ?        00:00:01 nm-applet --sm-disable
XXXXX     1510     1  0 08:09 ?        00:00:00 xfce4-power-manager
XXXXX     1512     1  0 08:09 ?        00:00:00 /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1
XXXXX     1514     1  0 08:09 ?        00:00:00 /usr/lib/gamin/gam_server
XXXXX     1516     1  0 08:09 ?        00:00:00 /usr/bin/volumeicon
XXXXX     1517     1  0 08:09 ?        00:00:00 /usr/bin/xfce4-volumed
root      1519     1  0 08:09 ?        00:00:00 /usr/lib/policykit-1/polkitd
XXXXX     1522     1  0 08:09 ?        00:00:00 /usr/lib/libgconf2-4/gconfd-2
XXXXX     1524     1  0 08:09 ?        00:00:00 /usr/bin/gnome-keyring-daemon --start --foreground --components=secrets
XXXXX     1528     1  0 08:09 ?        00:00:00 /usr/lib/notify-osd/notify-osd
XXXXX     1530     1  0 08:09 ?        00:00:00 /usr/lib/gvfs/gvfsd
XXXXX     1533  1478  0 08:09 ?        00:00:00 /usr/lib/orage/xfce4/panel-plugins/orageclock socket_id 14680123 name orageclock id 12837693382 display_name Orage Clock size 28 screen_position 11
XXXXX     1537     1  0 08:09 ?        00:00:00 xfce4-settings-helper --display :0.0 --sm-client-id 24385b7a9-1be2-4783-b3e4-2566464f0726
XXXXX     1538     1  0 08:09 ?        00:00:00 conky --pause=3 -c /home/XXXXX/Conky/.conkyrc.keys
XXXXX     1541     1  0 08:09 ?        00:00:00 conky --pause=3 -c /home/XXXXX/Conky/.conkyrc.main
XXXXX     1550     1  0 08:10 ?        00:00:00 /bin/bash /usr/sbin/su-to-root -X -c /usr/sbin/synaptic
XXXXX     1556  1550  1 08:10 ?        00:00:00 gksu -u root /usr/sbin/synaptic
root      1557  1556  0 08:10 ?        00:00:00 /usr/bin/sudo -H -S -p GNOME_SUDO_PASS -u root -- /usr/sbin/synaptic
XXXXX     1567  1329  2 08:10 tty2     00:00:01 -bash
root      1594  1567  0 08:11 tty2     00:00:00 sudo ps -ef
root      1595  1594  0 08:11 tty2     00:00:00 ps -ef

This is from Debian

XXXXX     1446     1  0 08:49 ?        00:00:00 xfwm4
XXXXX     1448     1  0 08:49 ?        00:00:00 xfce4-panel
XXXXX     1450     1  0 08:49 ?        00:00:00 Thunar --daemon
XXXXX     1452     1  0 08:49 ?        00:00:00 xfdesktop
XXXXX     1460     1  0 08:49 ?        00:00:00 xscreensaver -no-splash
XXXXX     1462     1  0 08:49 ?        00:00:00 /bin/bash /home/XXXXX/.config/xfce4/autostart.sh
XXXXX     1466     1  0 08:49 ?        00:00:00 /bin/bash /home/XXXXX/.config/xfce4/autostart.sh
XXXXX     1468  1466  0 08:49 ?        00:00:00 sleep 120s
XXXXX     1472     1  0 08:49 ?        00:00:00 xfsettingsd
XXXXX     1474     1  0 08:49 ?        00:00:00 /usr/bin/python -O /usr/share/wicd/gtk/wicd-client.py
XXXXX     1476     1  0 08:49 ?        00:00:00 /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1
XXXXX     1478     1  0 08:49 ?        00:00:00 /usr/bin/volumeicon
root      1483     1  0 08:49 ?        00:00:00 /usr/lib/policykit-1/polkitd
XXXXX     1485     1  0 08:49 ?        00:00:00 /usr/lib/gamin/gam_server
XXXXX     1486     1  0 08:49 ?        00:00:00 /usr/bin/xfce4-volumed
XXXXX     1489     1  0 08:49 ?        00:00:00 /usr/lib/xfce4-notifyd/xfce4-notifyd
XXXXX     1490  1462  0 08:49 ?        00:00:00 conky -q
XXXXX     1499     1  0 08:49 ?        00:00:00 xfce4-settings-helper --display :0.0 --sm-client-id 28dce6e49-241c-403e-8337-7ed2b4614623
XXXXX     1501     1  0 08:49 ?        00:00:00 /usr/lib/gvfs/gvfsd
XXXXX     1505  1448  0 08:49 ?        00:00:00 /usr/lib/orage/xfce4/panel-plugins/orageclock socket_id 16777275 name orageclock id 12837693382 display_name Orage Clock size 28 screen_position 11
XXXXX     1517     1  0 08:50 ?        00:00:00 /bin/bash /usr/bin/su-to-root -X -c /usr/sbin/synaptic
XXXXX     1523  1517  1 08:50 ?        00:00:00 gksu -u root /usr/sbin/synaptic
XXXXX     1525     1  0 08:50 ?        00:00:00 /usr/lib/libgconf2-4/gconfd-2
root      1530  1523  0 08:50 pts/0    00:00:00 /bin/su root -c /usr/lib/libgksu/gksu-run-helper "/usr/sbin/synaptic"
XXXXX     1532     1  0 08:50 ?        00:00:00 /usr/bin/gnome-keyring-daemon --start --foreground --components=secrets
XXXXX     1546  1295  2 08:50 tty2     00:00:00 -bash
root      1576  1546  3 08:51 tty2     00:00:00 sudo ps -ef
root      1577  1576  0 08:51 tty2     00:00:00 ps -ef

There are differences between the two.

#!

/bin/bash /usr/sbin/su-to-root -X -c /usr/sbin/synaptic
gksu -u root /usr/sbin/synaptic
/usr/bin/sudo -H -S -p GNOME_SUDO_PASS -u root -- /usr/sbin/synaptic

Debian

/bin/bash /usr/bin/su-to-root -X -c /usr/sbin/synaptic
gksu -u root /usr/sbin/synaptic
/usr/lib/libgconf2-4/gconfd-2 # not sure about this line
/bin/su root -c /usr/lib/libgksu/gksu-run-helper "/usr/sbin/synaptic"

Last edited by Ozitraveller (2012-01-10 21:46:04)

Offline

#13 2012-01-10 00:16:00

Ozitraveller
#! Junkie
From: Far from the madding crowd!
Registered: 2011-04-26
Posts: 257

Re: [SOLVED ]Help with sudo

This looks useful

Authorization Agent dialog:

http://docs.kde.org/stable/en/kdebase-w … ialog.html

Offline

#14 2012-01-11 04:18:59

Ozitraveller
#! Junkie
From: Far from the madding crowd!
Registered: 2011-04-26
Posts: 257

Re: [SOLVED ]Help with sudo

I checked the man page

http://www.linuxcertif.com/man/1/gksu/

DESCRIPTION
This manual page documents briefly gksu and gksudo
gksu is a frontend to su and gksudo is a frontend to sudo. Their primary purpose is to run graphical commands that need root without the need to run an X terminal emulator and using su directly.

Notice that all the magic is done by the underlying library, libgksu. Also notice that the library will decide if it should use su or sudo as backend using the /apps/gksu/sudo-mode gconf key, if you call the gksu command. You can force the backend by using the gksudo command, or by using the --sudo-mode and --su-mode options.

If no command is given, the gksu program will display a small window that allows you to type in a command to be run, and to select what user the program should be run as. The other options are disregarded, right now, in this mode.


gconftool-2 --set /apps/gksu/sudo-mode --type bool true

After running this command I now have the first dialog above (w/o the options)

Thanks
All and Graham for finding the man page smile

Offline

#15 2012-01-11 12:33:11

Thorny
#! CrunchBanger
Registered: 2011-05-19
Posts: 113

Re: [SOLVED ]Help with sudo

Good. Glad you figured out what you needed for whatever you wanted it for.  On a kde system it would probably drill down to kdesu rather than gksu.

Just as a reminder, no need to go to the 'Net for a manual page, the same page can be accessed on your system by entering, man gksu, into a terminal.

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo