Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Please advise how to add authenication on the drive so that other users can't mount it without password. I searched its manual on http://www.avixe.com/support.asp
They have instruction for adding password for Windows. I can't find it for Linux.
You must create a separate user that will be the only one allowed to mount the pendrive.
Then you must edit your /etc/fstab and configure the mount point and device. On options, add "uid=user" (without "users" option)
Whenever you want to mount the pendrive, you'll be needed to log into that specific user.
The problem is when I'm away while the PC is still running, any user can mount the device. Would it be possible adding a password? After typing "mount /dev/sda1 /mnt/sda1" [ENTER]. It will popup for password.
AFAIK, linux does not work like this. Only with an X server you'll be able to have an emerging window where you'll be asked to provide user and password (and depending on which window manager you use). If you are connecting wth your PC via ssh, you'll need to log into satimis and then mount the pendrive.
Take out the "umask=000" option and only satimis should be able to mount it and read/write to it.
With the umask=000 option you're giving full permissions to everyone to access the drive (if I remember good).
Maybe it's possible to write a bash script that will enable the password thing you like to have (like making a regular su, provide password and then mount the drive) but this goes beyond my skills, as I'm not familiar with programming.
Take out the "umask=000" option and only satimis should be able to mount it and read/write to it.
With the umask=000 option you're giving full permissions to everyone to access the drive (if I remember good).
So the respective entry on /etc/fstab should look like
Maybe it's possible to write a bash script that will enable the password thing you like to have (like making a regular su, provide password and then mount the drive)
I have been thinking of it before. I'm now searching around for information how to start. This will be a simple bash script. I don't need GUI.
Exactely, this is how it should look your fstab.
Root user will be able to mount the pendrive as well. But if someone gets your root password, I think this will be the least important problem you'd have
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.