Registered Member
|
HI guys,
i try to unload an Module via "modprobe" and then reload it via modprobe. I have written a script and i want it to work without password as sudo. The script is basic:
I putted the script in /sbin and gave the permissions 755 and
After that i modified the sudoers with:
The new line in the sudoers lookes like
i also tried
but nothing worked for me. If i write in the shell
I get
I read here, that this is an special issue to KDE Neon. https://bugs.kde.org/show_bug.cgi?id=407729 https://bugs.launchpad.net/ubuntu/+sour ... ug/1829609 Is there any solution? Greetings Jonny |
Registered Member
|
This is the wrong path to modprobe. This will show the correct path to put in your script:
/usr/sbin/modprobe is a different, but still incorrect path to modprobe. You need to put correct path in sudoers.
These reports are about Neon having a different path to a specific command, not the sudoers file. Greetings Jonny[/quote]
claydoh, proud to be a member of KDE forums since 2008-Oct, and KDE user since 2001
|
Registered Member
|
Also, is this something you are trying to use to fix the multitouch after suspend/resume?
There are other ways to do this, without needing to manually run a script.
claydoh, proud to be a member of KDE forums since 2008-Oct, and KDE user since 2001
|
Registered Member
|
Hi claydoh
you're right i made a mistake, the right path must be /sbin/modprobe and it is in my script, but the permission is not granted at all. you said: "Also, is this something you are trying to use to fix the multitouch after suspend/resume? There are other ways to do this, without needing to manually run a script." That's the point, is there an other way to fix this? That would be really nice Greeting Jonny |
Registered Member
|
I had to do something similar to this on my laptop, until the 20.04 upgrade, which fixed the issue on my particular hardware.
Open Kate or Kwrite ( or your favorite terminal editor with sudo) Add this text:
Save As /lib/systemd/system-sleep/multitouch Kate and Kwrite will prompt you for your password to save it. Next, open a terminal and mark the file as executable:
And give it a try. Reference: https://blog.christophersmart.com/2016/ ... nt-page-1/ (note the file used is in a different location in this article than it is for Ubuntu based systems, I have given the correct location above)
claydoh, proud to be a member of KDE forums since 2008-Oct, and KDE user since 2001
|
Registered Member
|
THx a lot, I will do this tomorrow and i will report u if it workes. But I think, this will be the better solution!
Maybe i will ask you something, if its ok... Have a nice day Jonny |
Registered Member
|
On the first view, it looks like it works. I mean the script.
But the other problem is, that i cant get make a skript with modprobe that works without the password. Is there a way to unload a module for example in a script without sudo? Greetings Jonny |
Registered Member
|
It can only be done by setting up sudoers correctly, or having the script run automatically by a system level process, such as my example above, with Systemd. I see I did not make it clear that my script, placed in the location specified, is run automatically by systemd when suspending and resuming. The reference link does, though. There is no password needed here. Is this not working?
claydoh, proud to be a member of KDE forums since 2008-Oct, and KDE user since 2001
|
Registered Member
|
Hi claydoh,
the script runs fine without any password. I know that the script in the location u gave me is loaded automatically, when system suspends and wakes up. My other question was, how can i define rules in "sudoers" with sudo visudo that the rules will be recognized. I tried that in many different ways line explained on the ubuntuusers Webpage, but nothing happend. If i define my script in sudoers the permission is yet permitted. Greetings Jonny |
Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell