LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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
Senior Member
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 3,371

Rep: Reputation: 782Reputation: 782Reputation: 782Reputation: 782Reputation: 782Reputation: 782Reputation: 782

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 13.1 / 12.3_64-KDE, Ubuntu 14.04, Fedora 20, Mint 17, Chakra
Posts: 3,665

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
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,269

Rep: Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028
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 13.1 / 12.3_64-KDE, Ubuntu 14.04, Fedora 20, Mint 17, Chakra
Posts: 3,665

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
Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 5,377

Rep: Reputation: 1108Reputation: 1108Reputation: 1108Reputation: 1108Reputation: 1108Reputation: 1108Reputation: 1108Reputation: 1108Reputation: 1108
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 13.1 / 12.3_64-KDE, Ubuntu 14.04, Fedora 20, Mint 17, Chakra
Posts: 3,665

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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
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
/usr/sbin/httpd: symbol lookup error: /usr/sbin/httpd: undefined symbol: apr_atomic_x dasoberdick Slackware 14 12-18-2010 04:32 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/Novell 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


All times are GMT -5. The time now is 03:48 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration