View previous topic :: View next topic |
Author |
Message |
fctk Veteran
Joined: 28 Jan 2004 Posts: 1424 Location: Milan, Italy, EU
|
Posted: Thu Aug 25, 2005 11:53 am Post subject: [ok] torsmo, hddtemp, sudo and /var/log/messages |
|
|
hello, i'd want to monitor my hard disk temperature with torsmo, so i installed hddtemp and put this line into .torsmorc:
Code: | ${exec sudo hddtemp -n /dev/hda} |
i need sudo because hddtemp must be run from root... the problem is that, in this way, every one second a new line is added to /var/log/messages:
Code: | thorium fctk # tail /var/log/messages
Aug 25 13:51:02 thorium sudo: fctk : TTY=unknown ; PWD=/home/fctk ; USER=root ; COMMAND=/usr/sbin/hddtemp -n /dev/hda
Aug 25 13:51:03 thorium sudo: fctk : TTY=unknown ; PWD=/home/fctk ; USER=root ; COMMAND=/usr/sbin/hddtemp -n /dev/hda
Aug 25 13:51:04 thorium sudo: fctk : TTY=unknown ; PWD=/home/fctk ; USER=root ; COMMAND=/usr/sbin/hddtemp -n /dev/hda
Aug 25 13:51:05 thorium sudo: fctk : TTY=unknown ; PWD=/home/fctk ; USER=root ; COMMAND=/usr/sbin/hddtemp -n /dev/hda
Aug 25 13:51:06 thorium sudo: fctk : TTY=unknown ; PWD=/home/fctk ; USER=root ; COMMAND=/usr/sbin/hddtemp -n /dev/hda
Aug 25 13:51:07 thorium sudo: fctk : TTY=unknown ; PWD=/home/fctk ; USER=root ; COMMAND=/usr/sbin/hddtemp -n /dev/hda
Aug 25 13:51:08 thorium sudo: fctk : TTY=unknown ; PWD=/home/fctk ; USER=root ; COMMAND=/usr/sbin/hddtemp -n /dev/hda
Aug 25 13:51:09 thorium sudo: fctk : TTY=unknown ; PWD=/home/fctk ; USER=root ; COMMAND=/usr/sbin/hddtemp -n /dev/hda
Aug 25 13:51:10 thorium sudo: fctk : TTY=unknown ; PWD=/home/fctk ; USER=root ; COMMAND=/usr/sbin/hddtemp -n /dev/hda
Aug 25 13:51:11 thorium sudo: fctk : TTY=unknown ; PWD=/home/fctk ; USER=root ; COMMAND=/usr/sbin/hddtemp -n /dev/hda |
in visudo i have:
Code: | %users thorium = NOPASSWD: /usr/sbin/hddtemp |
what can i do to avoid the execution of that command to be logged in /var/log/messages? thanks.
Last edited by fctk on Mon May 01, 2006 5:52 pm; edited 1 time in total |
|
Back to top |
|
|
Naib Watchman
Joined: 21 May 2004 Posts: 6051 Location: Removed by Neddy
|
Posted: Thu Aug 25, 2005 11:57 am Post subject: |
|
|
you could change the sticky bit on the hddtemp exe to give it root-like privelege to all users _________________
Quote: | Removed by Chiitoo |
|
|
Back to top |
|
|
fctk Veteran
Joined: 28 Jan 2004 Posts: 1424 Location: Milan, Italy, EU
|
Posted: Thu Aug 25, 2005 4:14 pm Post subject: |
|
|
do you mean:
Code: | chmod u+s /usr/sbin/hddtemp |
? |
|
Back to top |
|
|
phadron Tux's lil' helper
Joined: 28 Sep 2003 Posts: 96 Location: Padova
|
Posted: Tue Sep 20, 2005 9:51 am Post subject: |
|
|
fctk wrote: | do you mean:
Code: | chmod u+s /usr/sbin/hddtemp |
? |
si è risolto con quel comando la questione ?
non è che ogni volta che entro in gentoo
mi tocca dare quel comando ?
|
|
Back to top |
|
|
fctk Veteran
Joined: 28 Jan 2004 Posts: 1424 Location: Milan, Italy, EU
|
Posted: Tue Sep 20, 2005 1:29 pm Post subject: |
|
|
non credo che tu debba digitare il comando ogni volta, però se reinstalli hddtemp allora sì, devi ridigitarlo. è per questa ragione che non ho messo il tag [solved]...
-----
i don't think you have to issue the command every time, but only if you reinstall hddtemp. becouse of this, i didn't put the [solved] tag... |
|
Back to top |
|
|
fctk Veteran
Joined: 28 Jan 2004 Posts: 1424 Location: Milan, Italy, EU
|
Posted: Mon May 01, 2006 5:52 pm Post subject: |
|
|
I think I found the solution to this problem.
Code: | # emerge hddtemp netcat6 |
edit /etc/conf.d/hddtemp.
Code: | # /etc/init.d/hddtemp start
# rc-update add hddtemp default |
then use the following command:
Code: | nc6 localhost 7634 | cut -d"|" -f 4 |
|
|
Back to top |
|
|
|