Skip to content

Instantly share code, notes, and snippets.

@vault
Created January 25, 2013 02:17
Show Gist options
  • Save vault/4631148 to your computer and use it in GitHub Desktop.
Save vault/4631148 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE pam_mount SYSTEM "pam_mount.conf.xml.dtd">
<pam_mount>
<debug enable="1" />
<volume user="*" fstype="cifs" server="eng-home" path="%(exec userpath %(USER))" mountpoint="~" />
<mntoptions allow="nosuid,nodev,loop,encryption,fsck,nonempty,allow_root,allow_other" />
<mntoptions require="nosuid,nodev" />
<path>/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin</path>
<logout wait="0" hup="0" term="0" kill="0" />
<mkmountpoint enable="1" remove="true" />
</pam_mount>
#!/bin/bash
USER=$1
U=${USER:0:1}
S=${USER:1:1}
echo -n "users/$U/$S/$USER"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment