Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[ok] torsmo, hddtemp, sudo and /var/log/messages
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
fctk
Veteran
Veteran


Joined: 28 Jan 2004
Posts: 1424
Location: Milan, Italy, EU

PostPosted: Thu Aug 25, 2005 11:53 am    Post subject: [ok] torsmo, hddtemp, sudo and /var/log/messages Reply with quote

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
View user's profile Send private message
Naib
Watchman
Watchman


Joined: 21 May 2004
Posts: 6051
Location: Removed by Neddy

PostPosted: Thu Aug 25, 2005 11:57 am    Post subject: Reply with quote

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
View user's profile Send private message
fctk
Veteran
Veteran


Joined: 28 Jan 2004
Posts: 1424
Location: Milan, Italy, EU

PostPosted: Thu Aug 25, 2005 4:14 pm    Post subject: Reply with quote

do you mean:
Code:
chmod u+s /usr/sbin/hddtemp

?
Back to top
View user's profile Send private message
phadron
Tux's lil' helper
Tux's lil' helper


Joined: 28 Sep 2003
Posts: 96
Location: Padova

PostPosted: Tue Sep 20, 2005 9:51 am    Post subject: Reply with quote

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 ?

:roll:
Back to top
View user's profile Send private message
fctk
Veteran
Veteran


Joined: 28 Jan 2004
Posts: 1424
Location: Milan, Italy, EU

PostPosted: Tue Sep 20, 2005 1:29 pm    Post subject: Reply with quote

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
View user's profile Send private message
fctk
Veteran
Veteran


Joined: 28 Jan 2004
Posts: 1424
Location: Milan, Italy, EU

PostPosted: Mon May 01, 2006 5:52 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum