Changes

Linux CIFS Utils and Samba

1,159 bytes added, 06:27, 14 June 2021
/* Accessing Windows Shares: Discussion */
The following lines were added (+) and removed (-):
Another example for a modern NAS sudo mount -t cifs -o user=nicolep,uid=1001 //apollo/documents /mnt/documents''She will be prompted for a password when she executes this command for sudo, and again for the SMB account password for her account nicolep.  Also, the uid is set matching her local account in /etc/passwd so that the mounted share does not appear with all files and directories as owner root, thus they would have not been writable to her.''error: mount.cifs: bad UNC (/apollo/documents)  <- if you are getting this error make sure you have two forward slashes on the path //apolloUnmount when done sudo umount //apollo/nicolep#Using the mount command in a script (which prompts user for password when executed)HIGHLY RECOMMENDED - As a means to mount NAS and network shares without having to edit fstab or hard coding passwords.  More reliable than file manager tools like the one in Nautilus.RECOMMENDED - As a means to mount NAS and network shares without having to edit fstab or hard coding passwords.  More reliable than file manager tools like the one in Nautilus.=== mount via a shell script ===A method of using the mount command in a shell script which will prompt the user for passwords.  Doing this in a startup script will require some method of timeout as it could hold up system loading final.Better to have a command to launch script when shares are neededBased on executing the mount command in this fashion sudo mount -t cifs -o username=nicolep //servername/public /mnt/public
Bureaucrat, administrator
16,192
edits