So right now, my /etc/fstab folder looks like that.

//192.168.x.y/Share_1    /media/shared/share_1     cifs _netdev,user,credentials=/home/pierre-antoine/.password_windows,uid=1000,gid=1000     0       0
//192.168.x.y/Share_2    /media/shared/share_2     cifs _netdev,user,credentials=/home/pierre-antoine/.password_windows,uid=1000,gid=1000     0       0
//192.168.x.y/Share_3    /media/shared/share_3     cifs _netdev,user,credentials=/home/pierre-antoine/.password_windows,uid=1000,gid=1000     0       0

I think there is many things wrong in this configuration, and feel free to tell about this in the comments, but my first preoccupation is :

Is there a way to mount automatically remote folder when someone logs in ? And to make the uids and gids and passwords locations specifics to these users ?

By log-in I mean i mean visually, and in interactive shells. (though I don't care about non-interactive shells.)

Edit :

Now that I think about it, I realise that it implies a different connexion / identification for each valid user.

So I guess the file better be mounted in my home.

Edit 2 : libpam_mount seems to be the correct tool for the job. Closing this question

  • Since you've already found a solution, please consider writing that up as an answer so that it may help a future reader. Answering your own questions is allowed and encouraged here.
    – Haxiel
    Apr 10 '19 at 13:18
  • @Haxiel I really haven't found a solution, just the right tool :p There are dozens of complicated stuff I still don't understand. (Like, the syntax). Apr 10 '19 at 14:24

Your Answer

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

Browse other questions tagged or ask your own question.