LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-24-2013, 04:15 AM   #16
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373

Did you try adding the commands to /etc/rc.local as the link suggested? I'm not sure why that would be different to /etc/init.d/ scripts but it's worth a try?
 
Old 04-24-2013, 04:20 AM   #17
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629

Original Poster
Rep: Reputation: Disabled
SuSE hasn't got a rc.local, so I couldn't try that.
 
Old 04-24-2013, 08:01 AM   #18
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,362

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Re suid on scripts; I knew that but from post #9 it looked like powertop is a cpp thus binary exe.

Maybe its different for you, but normally the boot process has to run as root to do all the privileged things it needs to do, although some sub-processes may be run as a different user for their own reasons.

On eg RHEL, you'd have have an entry in /etc/rc.d/rc.local like
Code:
su - user -c "cmd args"
This syntax means no passwd or sudo reqd.
 
Old 04-25-2013, 02:50 AM   #19
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629

Original Poster
Rep: Reputation: Disabled
I found out what SuSE did to rc.local , since Google is my friend . They created an "/etc/init.d/after.local", a "script with local commands to be executed from init after all scripts of a runlevel have been executed". I appended

Code:
su - root -c /etc/init.d/<my-script>
It still does not work *sigh*.

Quote:
Originally Posted by chrism01 View Post
Re suid on scripts; I knew that but from post #9 it looked like powertop is a cpp thus binary exe.
It is an (interactive) binary. I took it's output and pasted it into a shellscript. That is what we are talking about in the meantime .

Quote:
Originally Posted by chrism01 View Post
Maybe its different for you, but normally the boot process has to run as root to do all the privileged things it needs to do, although some sub-processes may be run as a different user for their own reasons.
Booting openSuSE is done by "systemd", not anymore by sysvinit. I don't know how "systemd" handles users and permissions.

Quote:
Originally Posted by chrism01 View Post
On eg RHEL, you'd have have an entry in /etc/rc.d/rc.local like
Code:
su - root -c "cmd args"
This syntax means no passwd or sudo reqd.
I know that according to the man page of su the above entered "root" is redundant, but neither a simple "-" nor "- root" works. <edit1> A change of the command to

Code:
su - root -c "cmd >> /home/me/error.txt 2>&1"
brought no further insights either. Grrr. </edit1>

<edit2> Found out why: "su" is asking for a password. I created a test-script and ran that from console. [enter favourite expletives here]. What now?

Last edited by JZL240I-U; 04-25-2013 at 03:55 AM.
 
Old 04-25-2013, 08:15 AM   #20
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,671
Blog Entries: 4

Rep: Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945
There is nothing "magical" about the /usr/sbin directory ...
 
Old 04-25-2013, 08:48 AM   #21
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629

Original Poster
Rep: Reputation: Disabled
Thanks for stating the obvious . Do you also propose a solution for the Problem?

Last edited by JZL240I-U; 04-26-2013 at 07:47 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
/usr/sbin/httpd: symbol lookup error: /usr/sbin/httpd: undefined symbol: apr_atomic_x dasoberdick Slackware 16 10-11-2014 02:36 AM
Error: Cannot find 'ssh-keygen' in '/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin' venu.navat Linux - Software 3 03-08-2012 04:00 AM
[SOLVED] Cant execute commands that is in sbin/ with normal user. tERn Linux - Desktop 1 10-16-2009 11:18 AM
Can I install to /usr/local as a normal user? Jongi SUSE / openSUSE 8 12-20-2005 11:45 PM
How do you change what the /usr/sbin/service program runs? launchcode Red Hat 3 07-16-2004 01:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:36 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration