Show pageOld revisionsBacklinksExport to PDFBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== Mount samba share on Ubuntu in CLI (Terminal) ====== There are two moments when you can mount a Windows share: Before you log in, and after you log in. Here are both examples: Server name: fs Share name: install User: usr1 Password: pwd1 Local mountpoint: mnt Local user: ubuntuuser1 If you are a sudoer (or root), do the followinr <code> sudo smbmount //fs/install /mnt -o user=usr1 -p password:pwd1 </code> Note that you need to be a sudoer. If you want the share to be mounted for all users before anyone logs in, do the following: Edit the /etc/fstab and add the line: <code> //fs/install /mnt cifs guest,uid=1000,iocharset=utf8 0 0 </code> <code> //fs/install /mnt cifs username=usr1,password=pwd1,iocharset=utf8,sec=ntlm 0 0 </code> It would be wise to store the credentials elsewhere, since the 'fstab' file is readable by everyone. Create ~/.smbcredentials <code> username=usr1 password=pwd1 </code> <code> //fs/install /mnt cifs credentials=/home/ubuntuuser1/.smbcredentials,iocharset=utf8,sec=ntlm 0 0 </code> For special permissions (like chmod), you will need to provice a uid or gid parameter to the share's options <code> //fs/install /mnt cifs uid=ubuntuuser1,credentials=/home/ubuntuuser1/.smbcredentials,iocharset=utf8,sec=ntlm 0 0 </code> linux/samba_cifs/smb_mount_from_cli.txt Last modified: 2019/10/31 09:05by 127.0.0.1