Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 06-21-2006, 05:41 AM   #1
LQ Newbie
Registered: Oct 2003
Posts: 14

Rep: Reputation: 0
sudo and smartctl /dev/hda permission problem on Slackware 10.2

Hi all.
I`m trying to give user "joe" permissions to execute smartctl -H /dev/hda on my system. I`ve added a line like
"joe localhost = NOPASSWD: /usr/sbin/smartctl -H /dev/hda" in my /etc/sudoers file, but when i run sudo -u joe /usr/sbin/smartctl -H /dev/hda the following error appeared "Smartctl open device: /dev/hda failed: Permission denied" . Permissions of /dev/hda are "brw-rw---- 1 root disk 3, 0 2006-03-20 13:12 /dev/hda", so i`ve added user "joe" to group disk, but that don't solve the problem. After executing above command i get the error "A mandatory SMART command failed: exiting. To continue, add one or more '-T permissive' options."

Any suggestions what i'm doing(or not doing) wrong?
Old 06-21-2006, 06:12 AM   #2
Registered: Jul 2005
Location: England, UK
Distribution: Ubuntu 8.04 Server, Kubuntu 12.04
Posts: 698
Blog Entries: 1

Rep: Reputation: 31
maybe because your are trying to run the command as joe rather than joe running the command as root.
What I mean by that is, when you run
sudo -u joe (command)
you are runnaing a command with joe's UID and GID. But if you ran
sudo -u joe bash #Or whatever shell he uses
sudo (command)
then the user joe would run the command as root.
Old 06-21-2006, 07:47 AM   #3
LQ Newbie
Registered: Oct 2003
Posts: 14

Original Poster
Rep: Reputation: 0
You are right...stupid mistake. Thank you for your help.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
/dev/hda under lilo.conf even thoug my HD is under /dev/hdb Basel Slackware 8 10-27-2005 06:00 PM
slackware /dev/null permission denied reddazz Slackware 8 03-09-2005 07:56 PM
How can I boot either one of my hard drives /dev/hda or /dev/hdb, I have RH9 and FC2 omogunkristi Linux - General 1 06-21-2004 05:11 AM
Problem with kernel 2.6.5 - missing /dev/hda sm0q Linux - Newbie 8 04-09-2004 04:25 PM
Installing Slackware (Unable to read dev/hda mickx27 Slackware 7 03-13-2004 09:49 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:51 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration