ubuntu:samba:mount_a_windows_share
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
ubuntu:samba:mount_a_windows_share [2019/12/08 20:41] – peter | ubuntu:samba:mount_a_windows_share [2020/07/15 09:30] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 18: | Line 18: | ||
mount -t cifs -o username=USERNAME, | mount -t cifs -o username=USERNAME, | ||
</ | </ | ||
+ | |||
---- | ---- | ||
Line 27: | Line 28: | ||
<code bash> | <code bash> | ||
mount -t cifs -o username=USERNAME, | mount -t cifs -o username=USERNAME, | ||
- | |||
- | sudo mount -t cifs -o username=${USER}, | ||
</ | </ | ||
Line 69: | Line 68: | ||
</ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | |||
+ | <code bash> | ||
+ | sudo mount -t cifs -o username=${USER}, | ||
+ | </ | ||
+ | |||
---- | ---- | ||
Line 163: | Line 170: | ||
---- | ---- | ||
+ | ===== Extende fstab to assign full permissions to newly created files and directories ===== | ||
+ | |||
+ | Add these lines to / | ||
+ | |||
+ | <file bash / | ||
+ | ... | ||
+ | create mask = 0666 | ||
+ | force create mode = 0666 | ||
+ | directory mask = 0777 | ||
+ | force directory mode = 0777 | ||
+ | ... | ||
+ | </ | ||
+ | |||
+ | This gives 0777 permission to every samba users in the write list for new created directory or files. | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Hide Credentials ===== | ||
+ | |||
+ | Setup a credentials file so you don't need to enter your password in the command; causing it to be stored in your command history in plain-text) or at the prompt (a nuisance). | ||
+ | |||
+ | <code bash> | ||
+ | sudo mount -t cifs //nas/docs / | ||
+ | </ | ||
+ | |||
+ | Note the **credentials option** | ||
+ | |||
+ | <file bash / | ||
+ | username=peter | ||
+ | password=[REAL PASSWORD] | ||
+ | domain=WORKGROUP | ||
+ | </ | ||
ubuntu/samba/mount_a_windows_share.1575837700.txt.gz · Last modified: 2020/07/15 09:30 (external edit)