I am using Centos 7. I have a question. I have a NTFS formatted drive which I want to automount when I login. Right now I need to always click on the HDD name on my computer windows and entering root pass. Is this possible?

a busy cat


I suspect GNOME Disks will be too old to do this in CentOS, but it seems worth a look. Run the "Disks" app (maybe under a "utilities" menu), select your disk, then the ntfs partition (under Volumes), then click the cogs button under the partition. If there's an "Edit mount options", you can play with the GUI and do it that way. I'd suggest not mounting it automatically during boot if you don't need to, for sake of robustness and simplicity (otherwise I think you'd need a uid=youruser option for permissions).

In either case you will need to create the mount point. mkdir /media/ntfs or so, as root/using sudo.

Without GNOME Disks, you can add a line to /etc/fstab yourself. Caution: a mistake could break your boot process. You should identify the partition by UUID for robustness. (Particularly if it's a removable disk, though I don't know why it asks you for a root password in that case). Set the options user,noauto to let you mount it yourself after boot:

UUID=xx /media/ntfs ntfs user,noauto 0 0

You can use lsblk -f to list all hard drive partitions and their UUIDs. (E.g. when you took the screenshot it was sdc1, so look for the matching line and copy the UUID column).

  • this is the settings that i make right now i62.tinypic.com/1zgfc50.jpg and this is the lsblk -f output i58.tinypic.com/23sg8ro.jpg . I didnt restarted pc because i am afraid of not to boot the system. Do you think this is okay now? – borannb Jan 19 '15 at 20:08
  • And this is my current fstab file i62.tinypic.com/2uti5ol.jpg – borannb Jan 19 '15 at 20:46
  • ah, nofail should avoid any problems booting. The changes will take effect immediately. (but it can be a good idea to reboot to check that actually works). However as I said if you boot with it plugged in, I bet it gets mounted so only root can read or write the files. Solution: either uncheck the "at startup" tickbox, or add option uid=myusername. Unchecking seems simplest to me. – sourcejedi Jan 19 '15 at 22:34
  • should i use my root user or normal user in uid= ? – borannb Jan 19 '15 at 22:56
  • with these settings "nosuid,nodev,nofail,x-gvfs-show,user,noauto" it stills ask me to enter password when i try to click on hdd on my computer. – borannb Jan 20 '15 at 0:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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