Trying to get sudo to work in a .desktop icon command, under SUSE 10.1
Allright, things have been changed with the sudo program in SUSE 10.1. Does anybody out there want to give me the short version? I've consulted man visudo, man sudoers, and I'm not getting very far. I'm thinking that there's an additional text file to edit, somewhere.
I had the Netzero dialer installed under SUSE 10.0 so that I could run it with the following Command line in the .desktop file: Code:
sudo /opt/nzclient/runclient.sh Code:
deekbeek ALL=NOPASSWD: /opt/nzclient/runclient.sh In spite of all this preparation, I can't run the Netzero dialer as anything but root, anymore; I could run it under sudo as a regular user in SUSE 10.0 with the preparations cited. On the light side, any Linspire users can't brag about the Netzero dialer being theirs. Use alien to change netzero.deb to an rpm, install it with the new right-click software installer (forget Yast), change permissions for read, write and execute in the nzclient folder (and all subfolders), and there you have it. It's still for (GROAN) root only use in that state, though. |
I'd say that line in /etc/sudoers looks all right. What happens if you invoke the sudo command from the console?
|
If I enter this in my user Konsole:
Code:
sudo /opt/nzclient/runclient.sh Code:
DM set to off |
I have no idea what that means, but at least there seems to be nothing wrong with the sudo part.
You say it works fine as root, so there must be something wrong with the environment. What does the following give? Code:
sudo su - -c /opt/nzclient/runclient.sh |
That's just a typist way of doing what I already do with GUI, the system asks for a root password (I didn't bother typing the password to see if it would connect).
|
I've visited /usr/share/doc/packages/sudo on my drive, and read the troubleshooting doc and then tried this in the Defaults section of the sudoers file:
Code:
Defaults always_set_home Code:
deekbeek ALL=NOPASSWD: /opt/nzclient/runclient.sh Code:
su /opt/nzclient/runclient.sh Code:
deekbeek ALL=(ALL) ALL |
To launch a program with sudo you must use:
sudo /opt/nzclient/runclient.sh not su /opt/nzclient/runclient.sh as you seem to have under properties/application tab/command of the .desktop file so replace su with sudo and it should work well with deekbeek ALL=NOPASSWD: /opt/nzclient/runclient.sh in the sudoers file Don't use deekbeek ALL=(ALL) ALL for security reason. |
Thanks for spotting my typo. However, trying sudo instead of su again, which I already did with all of the conditions above, yesterday (and just tried it all again before my reply) using:
Code:
sudo /opt/nzclient/runclient.sh |
Apologies to those to whose time I have wasted with typographical errors. I am compelled to re-summarize my unresolved problem (side-stepping the overshadowing problem that SUSE 10.1 has a bad on-line updater zenworks/Yast fiasco, and I can't add a crypt partition or use encfs, etc.):
I have been able to run Netzero, which defaults it's installation to use by the root user only, as a non-root user, without being prompted to enter a password. I have been able to take this for granted and able to continuously do it with SUSE Linux versions 9.2 and 10.0. The actual program is the Netzero dialer (installed from an .rpm made by the alien program, out of the downloaded netzero.deb file). The circumstances which have allowed me to do this included editing the sudoers file, and then entering sudo (which I typographically mixed up with su, earlier, but I did not insert it as an actual syntax error in my trials; I checked this) at the start of the command line in the command box, under the application tab, produced by the properties pull-down of the netzero.desktop file(i.e., the icon). Now that I have SUSE Linux 10.1 installed, I can no longer accomplish this. I tried placing the following line in the user privilege specification section of the sudoers file: Code:
deekbeek ALL=NOPASSWD: /opt/nzclient/runclient.sh Code:
sudo /opt/nzclient/runclient.sh The changes above will not run Netzero (logged in as the user deekbeek under SUSE 10.1) from a click on the Netzero icon, and those changes only always did run Netzero under SUSE 10.0 or 9.2 (again, as the non-root user deekbeek). I can only run this as root now, with root typed into the run as a different user box under the activated check box, under advanced options of the application tab, under the properties pull-down of the netzero.desktop icon. I also always have to enter the root password in a popup prompt, presently. I am including the full contents of my present sudoers file in the code section below; can anybody tell me exactly which lines to change and where, so that I may return to running Netzero as a non-root user? You will notice commented-out lines which I have also tried (in the defaults and user privilege specification section), due to having already consulted the troubleshooting document in /usr/share/doc/packages/sudo. I have always run the visudo -c command after edits, to ensure a non-corrupt sudoers file : Code:
# sudoers file. |
Does the sudo command work with another script/program to run as root?
Try to put in the sudoers file: Quote:
Quote:
Also check if you have a /var/run/sudo directory which is owned by root with permissions drwx------ |
I think it's time to look for another ISP, then. I lack a similar external program package installed in a similar-enough way to consider trying to run it with sudoers and sudo (as a test). I have error messages logged, about sudo failing to run, which I expect. The permissions are as you state.
I don't have time for this, because I cannot apply any update patches in SUSE 10.1. |
Here it is, then. I signed up with allvantage.com today. It works easily enough run as a regular user from kinternet, but I can't figure out a kppp setup, yet (I'd like that better, since it can store all the access numbers on my Desktop).
|
All times are GMT -5. The time now is 08:59 AM. |