CIFS: Difference between revisions

From Omnia
Jump to navigation Jump to search
No edit summary
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 4: Line 4:




  mount.cifs //some-cifs.example.com/someshare somemount/ -o dom=ad,user=someuser,pass="SomePA@@"
  mount.cifs //some-cifs.example.com/someshare somemount/ -o dom=ad,user=someuser,pass=SomePA@@
 
/etc/fstab
//some-cifs.example.com/someshare somemount/ cifs dom=ad,user=someuser,pass=SomePA@@ 0 0
 
-- credentials in file --
 
mount.cifs //myserverhere.com/cifs_share /mnt/cifs_share \
    -o user,uid=65001,rw,workgroup=DEV,credentials=/root/.cifs
 
/root/.cifs:
  username=ouruser
  password=ourpassword
 
Add domain if needed:
  domain=domain
 
//[URL]/[sharename] /media/[mountpoint] cifs vers=3.0,credentials=/home/[username]/.sharelogin,iocharset=utf8,file_mode=0777,dir_mode=0777,uid=[username],gid=[username],nofail 0 0
 
sudo chmod 0600 /root/.cifs
 
refs: <ref>https://serverfault.com/questions/367934/how-do-i-pass-credential-file-to-mount-cifs</ref> <ref>https://serverfault.com/questions/367934/how-do-i-pass-credential-file-to-mount-cifs</ref>
 
-
 
Note this works:
username=user@example.com
 
And this works:
username=userid
domain=AD
 
But these forms do NOT work:
username=AD\userid
username=AD\\userid
username=AD//userid

Latest revision as of 21:12, 18 February 2025

mount

apt install cifs-utils samba samba-client


mount.cifs //some-cifs.example.com/someshare somemount/ -o dom=ad,user=someuser,pass=SomePA@@

/etc/fstab

//some-cifs.example.com/someshare somemount/ cifs dom=ad,user=someuser,pass=SomePA@@ 0 0

-- credentials in file --

mount.cifs //myserverhere.com/cifs_share /mnt/cifs_share \
   -o user,uid=65001,rw,workgroup=DEV,credentials=/root/.cifs
/root/.cifs:
 username=ouruser
 password=ourpassword

Add domain if needed:

 domain=domain
//[URL]/[sharename] /media/[mountpoint] cifs vers=3.0,credentials=/home/[username]/.sharelogin,iocharset=utf8,file_mode=0777,dir_mode=0777,uid=[username],gid=[username],nofail 0 0
sudo chmod 0600 /root/.cifs

refs: [1] [2]

-

Note this works:

username=user@example.com

And this works:

username=userid
domain=AD

But these forms do NOT work:

username=AD\userid
username=AD\\userid
username=AD//userid