Is there a way to read sudo pass word (for example from a file ) for executing a command as below hdparm -I /dev/sd?|grep -E “Number|/dev”
or simply is it possible to call hdparm without sudo / password
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Can you provide exact line what need to be added to sudoers file that allow to launch hdparm without being asked for password?
nevermind, checked and works:
administrator ALL = (ALL) NOPASSWD: /bin/hdparm
Last edit: Rafal 2020-01-12
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Is there a way to read sudo pass word (for example from a file ) for executing a command as below
hdparm -I /dev/sd?|grep -E “Number|/dev”
or simply is it possible to call hdparm without sudo / password
Search for sudoers http://linux.die.net/man/5/sudoers. You can configure sudo to not ask the password for "sudo hdparm"
Can you provide exact line what need to be added to sudoers file that allow to launch hdparm without being asked for password?
nevermind, checked and works:
administrator ALL = (ALL) NOPASSWD: /bin/hdparm
Last edit: Rafal 2020-01-12