You are not logged in.

#1 2009-09-28 16:08:59

virus_found
Member
From: Moscow
Registered: 2009-05-22
Posts: 51
Website

[Solved] Autofs: mount as user?

Hello, I have these:

[virus_found@arch ~]$ cat /etc/udev/rules.d/00.rules
KERNEL=="sd[b-z]", NAME="%k", SYMLINK+="flash", GROUP="users", OPTIONS="last_rule"
KERNEL=="sd[b-z][0-9]", NAME="%k", SYMLINK+="flash", GROUP="users", OPTIONS="last_rule"
[virus_found@arch ~]$ cat /etc/autofs/auto.master 
/media /etc/autofs/auto.misc
[virus_found@arch ~]$ cat /etc/autofs/auto.misc 
cd    -fstype=auto,ro,nodev,nosuid,users                :/dev/cdrom
flash    -fstype=auto,rw,noauto,sync,dirsync,noexec,nodev,noatime,users    :/dev/flash
card    -fstype=auto,rw,noauto,sync,dirsync,noexec,nodev,noatime,users    :/dev/card

Udev rules are for symlinking to /dev/flash. All is working, except for users flag in mount options of auto.misc. Everythng is mounted with root rights sad How do I solve this?

Last edited by virus_found (2009-10-13 07:53:53)

Offline

#2 2009-09-29 12:11:36

openfred
Member
Registered: 2009-03-12
Posts: 6

Re: [Solved] Autofs: mount as user?

try user (no S at the end) instead of users (fstab syntax, see man fstab)
Fred

Offline

#3 2009-09-29 13:24:27

virus_found
Member
From: Moscow
Registered: 2009-05-22
Posts: 51
Website

Re: [Solved] Autofs: mount as user?

Unfortunately, that won't do anything. Everything is still automounted as root sad
I wonder, does nobody use Autofs? If so, what's the alternative to it? Except for overbloated GUI filemanagers? Does everybody mount in terminal everytime a cd or flash is inserted? -_-

Offline

#4 2009-09-29 21:54:50

fijam
Member
Registered: 2009-02-03
Posts: 244
Website

Re: [Solved] Autofs: mount as user?

I use uid/gid instead, and it works for me.

sda1 -fstype=auto,defaults,noatime,gid=100,uid=1000,nls=utf8 :/dev/sda1
sda4 -fstype=auto,defaults,noatime,iocharset=utf8,uid=1000,gid=100 :/dev/sda4

Hope that helps.

Offline

#5 2009-09-30 12:01:35

h2vnteam
Member
From: Saigon - vietnam
Registered: 2009-09-23
Posts: 10
Website

Re: [Solved] Autofs: mount as user?

Using uid/gid seems to be the best solution for this case. You could get your group id by running the following command :

grep "your group" /etc/group

Offline

#6 2009-09-30 17:35:38

virus_found
Member
From: Moscow
Registered: 2009-05-22
Posts: 51
Website

Re: [Solved] Autofs: mount as user?

Thanks to you all. That did the trick. I should have looked through the manuals more thoroughly smile

Last edited by virus_found (2009-09-30 17:36:46)

Offline

Board footer

Powered by FluxBB