Arch Linux Install Network Shares¶
Warning
These instructions are incomplete and are here for reference.
The easiest way to handle mounting network shares at login is by using "pam_mount".
- Install "pam_mount"
# pacman -Sy pam_mount
- Make a backup copy of "/etc/security/pam_mount.conf.xml" and edit the original to resemble:
# nano /etc/security/pam_mount.conf.xml
<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE pam_mount SYSTEM "pam_mount.conf.xml.dtd"> <!-- See pam_mount.conf(5) for a description. --> <pam_mount> <!-- debug should come before everything else, since this file is still processed in a single pass from top-to-bottom --> <debug enable="0" /> <!-- Volume definitions --> <volume fstype="cifs" server="JOHN" path="dev" mountpoint="~/Development/WorkingDirectory" options="sec=krb5,cruid=%(USER),noforceuid,noforcegid,rw" /> <volume fstype="cifs" server="DATA" path="files/Groups/R&D" mountpoint="~/NetworkStore/R&D" options="sec=krb5,cruid=%(USER),noforcegid,noforceuid,rw" /> <volume fstype="cifs" server="DATA" path="files/Users/%(DOMAIN_USER)" mountpoint="~/NetworkStore/My_Files" options="sec=krb5,cruid=%(USER),noforcegid,noforceuid,rw" /> <!-- pam_mount parameters: General tunables --> <!-- <luserconf name=".pam_mount.conf.xml" /> --> <!-- Note that commenting out mntoptions will give you the defaults. You will need to explicitly initialize it with the empty string to reset the defaults to nothing. --> <mntoptions allow="nosuid,nodev,loop,encryption,fsck,nonempty,allow_root,allow_other,sec,cruid,uid,gid,rw" /> <!-- <mntoptions deny="suid,dev" /> <mntoptions allow="*" /> <mntoptions deny="*" /> --> <mntoptions require="nosuid,nodev" /> <!-- requires ofl from hxtools to be present --> <logout wait="0" hup="no" term="no" kill="no" /> <!-- pam_mount parameters: Volume-related --> <lclmount>mount -t%(FSTYPE) %(VOLUME) %(MNTPT) "%(if %(OPTIONS),-o%(OPTIONS))"</lclmount> <mkmountpoint enable="1" remove="true" /> </pam_mount>
- Modify /etc/pam.d/system-local-login:
# nano /etc/pam.d/system-local-login
#%PAM-1.0 auth include system-login auth sufficient pam_mount.so account include system-login password include system-login password sufficient pam_mount.so session include system-login session optional pam_mount.so