is it possible to retrieve harddisk temperature for users without root priviledge?

users without root priviledge means neither root nor normal user using sudo command
i have tried smartctl and hddtemp, both of them need root priviledge

On 2013-05-13 17:26, redhatlinux10 wrote:
>
> users without root priviledge means neither root nor normal user using
> sudo command
> i have tried smartctl and hddtemp, both of them need root priviledge

You can make the tools suid, they will run, but if they can do something
dangerous, a plain user can do it.

The proper thing is to use a properly configured sudo, which asks for
the user’s password, not root’s password.


Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)

I am seeing HD temp in “gnome-disk-utility” and i don’t need to do sudo or gnomesu.
http://paste.opensuse.org/images/20046614.png

On 2013-05-13 20:16, vazhavandan wrote:
>
> I am seeing HD temp in “gnome-disk-utility” and i don’t need to do sudo
> or gnomesu.

I’m looking at the files in “/sys/block/sda/”. Many are user readable,
but I don’t see (or detect) one for temperature.

There is also “/proc/diskstats”, but I don’t know if a value there is
temp - probably not.


Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)

posted screenshot a few minutes after making the post.

On Mon 13 May 2013 03:26:01 PM CDT, redhatlinux10 wrote:

users without root priviledge means neither root nor normal user using
sudo command
i have tried smartctl and hddtemp, both of them need root priviledge

Hi
Sure, using hddtemp as root enable/start the service, if you hve
multiple drives, then you need to configure the sysconfig file

For example I have two drives, so my hddtemp sysconfig file contains;


DEVICE="/dev/sd[a-b]"

Then as my user I can use netcat;


netcat localhost 7634

|/dev/sda|OCZ-AGILITY3|30|C||/dev/sdb|WDC WD2500BEKT-75A25T0|34|C|

From this you can create a script to clean up as required…


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 12.3 (x86_64) Kernel 3.7.10-1.4-desktop
up 1:08, 3 users, load average: 0.12, 0.17, 0.13
CPU Intel® i5 CPU M520@2.40GHz | GPU Intel® Arrandale

On 2013-05-14 04:16, vazhavandan wrote:

> posted screenshot a few minutes after making the post.

I was not commenting on the photo, I was thinking of another route.


Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)