View previous topic :: View next topic |
Author |
Message |
xanthax Tux's lil' helper
Joined: 16 Apr 2004 Posts: 91 Location: Bi Nary State
|
Posted: Thu Apr 06, 2006 11:42 am Post subject: [HowTo] Automatic cifs/smb mount on boot with pam_mount |
|
|
Thanks to the users " linux_girl / tuxophil / nullkey " i have now egnough material make this simplifyed howtwo on simple OnLogin mounting of cifs / smbfs with pam_mount.
Just follow the instructions
Code: |
# mkdir -p /usr/local/portage/sys-libs/
# wget http://bugs.gentoo.org/attachment.cgi?id=48486 -O-|tar xzvf - -C/usr/local/portage/sys-libs/
# PORTDIR_OVERLAY="/usr/local/portage/" ACCEPT_KEYWORDS="~x86" emerge pam_mount
|
***WARNING DON'T UPDATE PAM FILE WITH "etc-update" IF YOU ALREADY USE PAM FOR SOMETHING***
***IF YOU DO YOU COULD REMOVE EARLIER PAM_SETTINGS***
(BTW: this is something they sould fix in gentoo with for example ".conf.example" instead of ".conf")
Code: |
# nano -wc /etc/pam.d/login
|
[EDIT] Add uncommented lines and comment out the outcommented lines.
Code: |
#auth include system-auth
auth required pam_stack.so service=system-auth
auth optional pam_mount.so use_first_pass
#password include system-auth
password required pam_stack.so service=system-auth
#session include system-auth
session required pam_stack.so service=system-auth
session optional pam_mount.so
|
Code: |
# nano -wc /etc/security/pam_mount.conf
|
[EDIT] Add mounts as follows at the bottom.
Code: |
# volume [user] [fstype] [server] [share] [mountpoint] [mountoptions] - -
volume me cifs myserv myfold /mnt/myfold uid=me,gid=mygrp - -
|
You can also use * as [user] to automatically get the logged on user.
if * is used you can use & instead of strings to susbstitute string with the username.
***WARNING HAVE BOOT-CD READY BECAUSE IF YOU DO A TYPOO WRONG YOU COULD GET STUCK UNABLE TO LOG IN***
QUIT EVERYTHING AND LOG IN AGAIN
And as i said all the credits goes to " linux_girl / tuxophil / nullkey "
i just merged the info.... _________________ God is only an imaginary friend for adults... |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|