Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Currently, I can right click any drive that is attached to the system and click format. No password is asked at all while the data is wiped. I can also format any drive from the disk utility. This brings back scary memories of Windows -- how can I make it ask for a password?

share|improve this question
    
Are we talking about USB drives? Usually, they are mounted in a way that the user can do everything with them. You would have to change the way drives get mounted in order to protect them. You cannot format your root partition, right? –  queueoverflow Apr 23 '11 at 21:34
    
What disk utility do you mean exactly? GNOME Disk Utility? In the last case you will be asked an are-you-sure-question and additionally will have to enter your password to get root permissions. –  qbi Apr 23 '11 at 21:35
    
@queueoverflow Yes, a usb thumb drive to be exact. I havn't tried formatting my root (dont want to lol), but I needed to enter my password to change the label, so I would most likely need to enter it to format it as well. That at least is good. So, applying this to usb/user mounted drives is not possible without having the drives get mounted by root? @qbi the disk utility is palimpsest, just "Disk Utility" in the menus. –  nerdy_kid Apr 25 '11 at 14:56
    
I guess you would have to work on the way drives are mounted on your computer then. But remember, someone could just plug the drive in their own computer and wipe the data. There is no protection against this. –  queueoverflow Apr 25 '11 at 20:32

2 Answers 2

Unix is featuring a groups system. You can easily avoid certain users from doing things, by removing them from the required group. That means they can start the program, but it won't be able to do anything! You can see the groups of the currently logged in user by the "groups" command.

Use "gpasswd" to remove the desired user from the "disk" and "storage" group.

Of course you must also remove him from the "wheel" group, so that he cannot use "sudo" to become another user(root).

https://wiki.archlinux.org/index.php/Groups

share|improve this answer

You can add password by using launcher properties. All you have to do,

  • Right click to gnome-menu and edit menus,
  • Find the administration tab and then disk utility item,
  • Open the properties of disk utility,
  • Change the "command" of disk utility from "palimpsest" to "su-to-root -X -c palimpsest",
  • Close and exit.

Good luck.

share|improve this answer
1  
this doesn't really fix the problem. If someone ran palimpsest from the terminal they wouldn't need to enter a password. –  nerdy_kid Apr 25 '11 at 15:00
    
If you really do that, you should change the access right of the file: chmod 644 /usr/bin/palimpsest –  Coldfish Apr 27 '11 at 11:52
    
@Coldfish That doesn't fix the problem either. Someone could still make their own copy of the file and change its permissions, or import their own copy of the file from another system (if they couldn't access it), or use a different program to perform the same actions (such as the numerous command-line utilities present on any Ubuntu system that can be used for this purpose), or write or import their own program to perform the actions. Removing execute permissions from a non-setuid executable never actually limits users' ability to do anything. (That's not to say setuid-ing it would help!) –  Eliah Kagan Nov 13 '11 at 3:47

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.