Ask Your Question
0

how do i mount an external drive specific to the user logged in

asked 2014-11-04 05:38:45 -0600

Kimberleyc gravatar image

I have 3 users on fedora 20, each have their own external samba drive. How do i configure fedora so if user 1 logs in (to gnome), it mounts external disk 1, if user 2 logs in, it mounts disk 2 and the same for user 3 ?

I tried .bashrc and a script in etc/profile.d but i found that only works when terminal is opened, and repeats again every time a terminal is opened.

edit retag flag offensive close merge delete

Comments

It sounds like automount is what you want to set up. The man pages for systemd.automount would be a place to start for getting it set up.

ccd gravatar imageccd ( 2014-11-04 16:56:41 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-11-04 19:12:10 -0600

baoboa gravatar image

updated 2014-11-04 20:13:29 -0600

add a lines like this in your /etc/fstab

//10.0.0.6/Public /mnt/disk1 cifs x-systemd.automount 0 0

//10.0.0.7/Public /mnt/disk2 cifs x-systemd.automount 0 0

//10.0.0.8/Public /mnt/disk3 cifs x-systemd.automount 0 0

then the right of files in disk1 can be restricted to user1

you can use autofs instead howto

edit flag offensive delete link more

Question Tools

Stats

Asked: 2014-11-04 05:38:45 -0600

Seen: 223 times

Last updated: Nov 04 '14