samba/connect.sh
raw link view readme1 | hello |
2 | EOF |
3 | |
4 | smbclient //beta/librarian -U jdoe << EOF |
5 | hello |
6 | EOF |
7 | |
8 | cat > /mnt/.smbcredentials << EOF |
9 | username=jdoe |
10 | password=hello |
11 | EOF |
12 | chmod 600 /mnt/.smbcredentials |
13 | |
14 | mkdir /mnt/jdoe_share |
15 | |
16 | set -o noclobber |
17 | cat >> /etc/fstab << EOF |
18 | //beta/librarian /mnt/jdoe_share cifs credentials=/mnt/.smbcredentials,default 0 0 |
19 | EOF |
20 | |
21 | mount -a |
22 |