Results 1 to 7 of 7

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

  1. #1
    Join Date
    Nov 2012
    Location
    Sanya, China
    Posts
    242

    Default 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
    Using openSUSE 13.2 64bit, KDE 4.14.9
    Blog website: http://suselinks.us

  2. #2
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: is it possible to retrieve harddisk temperature for users withoutroot 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)

  3. #3
    Join Date
    May 2010
    Location
    Space Colony Lagrange Point 22° à, 77° Ƅ, 56° ɤ, 99° ɜ
    Posts
    3,166

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

    I am seeing HD temp in "gnome-disk-utility" and i don't need to do sudo or gnomesu.
    GNOME Version 3.20.2
    openSUSE Leap 42.3 64-bit

    www.vazhavandan.blogspot.com

  4. #4
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: is it possible to retrieve harddisk temperature for users withoutroot priviledge?

    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)

  5. #5
    Join Date
    May 2010
    Location
    Space Colony Lagrange Point 22° à, 77° Ƅ, 56° ɤ, 99° ɜ
    Posts
    3,166

    Default Re: is it possible to retrieve harddisk temperature for users withoutroot priviledge?

    Quote Originally Posted by robin_listas View Post
    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.
    GNOME Version 3.20.2
    openSUSE Leap 42.3 64-bit

    www.vazhavandan.blogspot.com

  6. #6
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,865
    Blog Entries
    15

    Default Re: is it possible to retrieve harddisk temperature for userswithout root priviledge?

    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;
    Code:
    DEVICE="/dev/sd[a-b]"
    Then as my user I can use netcat;
    Code:
    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


  7. #7
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: is it possible to retrieve harddisk temperature for users withoutroot priviledge?

    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)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •