title: Mount network share with nfs with username / password
body: <p>I am trying to mount a NAS using nfs for an application. 
  The Storage team has exported it to the host server and I can access it at /nas/data.</p>
  
  <p>I am using containerized application and this file system export to the host machine will be a security issue as any container running on the host will be able to use the share. So this linux to linux mounting will not work for me.</p>
  
  <p>So the only alternate solution I have is mounting this nas folder during container startup with a username /password.</p>
  
  <p>The below command works fine on a share supporting Unix/Windows. I can mount on container startup</p>
  
  <pre><code>mount -t cifs  -osec=ntlmv2,domain=mydomain,username=svc_account,password=password,noserverino //nsnetworkshare.domain.company/share/folder /opt/testnas
  </code></pre>
  
  <p><strong>I have been told that we should use nfs option instead of cifs.</strong> 
  <strong>So just trying to find out whether using nfs or cifs will make any difference.</strong></p>
  
  <p>Specifying nfs option gives below error.</p>
  
  <pre><code> mount -t nfs -o nfsvers=3,domain=mydomain,username=svc_account,password=password,noserverino //nsnetworkshare.domain.company/share/folder /opt/testnas
  
  
  mount.nfs: remote share not in 'host:dir' format
  </code></pre>
  
  <p>Below command doesnt' seem to work either.</p>
  
  <pre><code> mount -t nfs -o nfsvers=3,domain=mydomain,username=svc_account,password=password,noserverino nsnetworkshare.domain.company:/share/folder /opt/testnas
  
  mount.nfs: an incorrect mount option was specified
  </code></pre>
  
  <p>I couldn't find a mount -t nfs option example with username /password. So I think we can't use mount -t nfs with credentials.</p>
  
  <p>Please pour in ideas.</p>
  
  <p>Thanks,<br>
  Vishnu</p>