Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Kernel & Hardware
  • Search

Running hddtemp as regular user

Kernel not recognizing your hardware? Problems with power management or PCMCIA? What hardware is compatible with Gentoo? See here. (Only for kernels supported by Gentoo.)
Post Reply
Advanced search
10 posts • Page 1 of 1
Author
Message
Arainach
l33t
l33t
User avatar
Posts: 609
Joined: Thu Jul 08, 2004 2:30 am

Running hddtemp as regular user

  • Quote

Post by Arainach » Sat Jan 29, 2005 12:45 am

For part of my torsmo config, I'd like to include the following line:

Code: Select all

execi 5 hddtemp -n /dev/hda
The command (hddtemp -n /dev/hda) runs flawlessly as root. However, when run as a regular user, I get the following error:

Code: Select all

ERROR: You must be root to run the command, or the root must set the suid bit for the executable.
I've already copied hddtemp to /usr/bin (out of /usr/sbin) and chmod 755ed it. What is this "set the suid" bit?
Gentoo: Stage3 w/ NPTL & udev, gcc 3.4.4 full rebuild
Kernel: 2.6.15-gentoo-r1 w/ 1G-Lowmem Patch
System: Athlon XP 2.2Ghz/1GB Corsair Value/160GB, 250GB WD IDE/128MB GeForce 6800/Sony 17" Trinitron G200 @ 1280x1024x75Hz
Top
WladyX
Guru
Guru
User avatar
Posts: 503
Joined: Thu Nov 25, 2004 4:17 pm
Location: Romania
Contact:
Contact WladyX
Website

  • Quote

Post by WladyX » Sat Jan 29, 2005 1:13 am

try

Code: Select all

chmod u+s /usr/sbin/hddtemp
We are not alone.
Top
Arainach
l33t
l33t
User avatar
Posts: 609
Joined: Thu Jul 08, 2004 2:30 am

  • Quote

Post by Arainach » Sat Jan 29, 2005 1:25 am

That worked perfectly. Thanks.

Out of curiosity, exactly what does that do?
Gentoo: Stage3 w/ NPTL & udev, gcc 3.4.4 full rebuild
Kernel: 2.6.15-gentoo-r1 w/ 1G-Lowmem Patch
System: Athlon XP 2.2Ghz/1GB Corsair Value/160GB, 250GB WD IDE/128MB GeForce 6800/Sony 17" Trinitron G200 @ 1280x1024x75Hz
Top
desertstalker
Apprentice
Apprentice
Posts: 209
Joined: Sat Sep 18, 2004 8:18 am

  • Quote

Post by desertstalker » Sat Jan 29, 2005 1:48 am

runs hddtemp with root priverleges (sp?) so when a user runs it it runs as root. it is the suid bit.
Top
fctk
Veteran
Veteran
Posts: 1424
Joined: Wed Jan 28, 2004 8:08 pm
Location: Milan, Italy, EU

  • Quote

Post by fctk » Tue Aug 16, 2005 5:59 pm

anyone know why sudo and the following line:

Code: Select all

%users ALL = NOPASSWD: /usr/sbin/hddtemp
is not enough?
i must issue:

Code: Select all

chmod u+s /usr/sbin/hddtemp
to make it work.
Top
s0be
Apprentice
Apprentice
User avatar
Posts: 240
Joined: Sat Nov 23, 2002 1:12 pm

  • Quote

Post by s0be » Tue Aug 16, 2005 6:26 pm

did you do sudo hddtemp or just hddtemp once you had that sudo line?
Top
fctk
Veteran
Veteran
Posts: 1424
Joined: Wed Jan 28, 2004 8:08 pm
Location: Milan, Italy, EU

  • Quote

Post by fctk » Tue Aug 16, 2005 6:32 pm

thanks s0be, i forgot to put the "sudo" in front of the command... :oops: :oops: :oops: :oops:
Top
s0be
Apprentice
Apprentice
User avatar
Posts: 240
Joined: Sat Nov 23, 2002 1:12 pm

  • Quote

Post by s0be » Tue Aug 16, 2005 7:11 pm

that is my second most common error... most common is:

vi somescript.pl
cat logfile > somescript.pl

rather than

vi somescript.pl
cat logfile | somescript.pl

That usually hurts...
Top
fctk
Veteran
Veteran
Posts: 1424
Joined: Wed Jan 28, 2004 8:08 pm
Location: Milan, Italy, EU

  • Quote

Post by fctk » Tue Aug 16, 2005 7:26 pm

s0be wrote:That usually hurts...
yes, i agree... :roll:
Top
fctk
Veteran
Veteran
Posts: 1424
Joined: Wed Jan 28, 2004 8:08 pm
Location: Milan, Italy, EU

  • Quote

Post by fctk » Mon May 01, 2006 5:54 pm

it seems there is a better solution... see http://forums.gentoo.org/viewtopic-p-2675394.html (last post)
Top
Post Reply

10 posts • Page 1 of 1

Return to “Kernel & Hardware”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic