Changes

no edit summary
This is a quick how to showing the steps to setup a network share under Linux using a protected credentials file to store the username and password as well as enabling "on-demand" mounting. This means that the shares won't be mounted at boot but instead will be mounted the first time the directory is accessed.
 
This guide also assumes that you want to access the files as your standard user (not root). The uid= and gid= options are included in /etc/fstab to accomplish this. Without those flags your user will be able to read but not write to the network share. Look up the "permissions" option to learn how to do other things.
#Create your Credentials file
##*password=PASSWORD
##run ''chmod 600 /root/.credentials/server-credentials'' to make it so that only root can read this file
#Create your Local Share Directoryand make your user the owner
##run ''sudo mkdir /mnt/server/share''
##run ''sudo chown USER:GROUP /mnt/server/share'' (replacing USER:GROUP with your user and group)
#Figure out the User Id and Group Id of your user, for the next step, by running the following
#*''id -u USERNAME'' (replacing USERNAME with your username)
#*''id -g USERNAME'' (replacing USERNAME with your username)
#Modify your fstab file
##run ''sudo nano /etc/fstab''
##add the following line to the bottom of the file
##*''//server/share /mnt/server/share cifs credentialsuid=UID,gid=GIDcredentials=/root/.credentials/server-credentials''(replacing UID and GID with the User Id and Group Id you just found)
#Test your changes
##run ''sudo mount -a'' to reload the fstab file
##run ''cd /mnt/server/share'' to navigate to the network share directory
##run ''ls'' to see what's there. It should now be populated with whatever is on the network share