Archive

Posts Tagged ‘samba’

Mount Samba Share as a Non-root User

April 9th, 2015 No comments

I used to access windows share folders directly in nautilus, or mount them like:

# mount -t cifs -o username=<your_username>,password=<your_password> //<your_server>/<your_share> /mnt/<your_local>

The problem is, they can be accessed only by root. The solution is adding a simple uid option like:

# sudo mount -t cifs -o uid=<your_uid>,username=<your_username>,password=<your_password>,domain=<your_domain> //<your_server>/<your_share> /mnt/<your_local> -vvv

See: http://wiki.centos.org/TipsAndTricks/WindowsShares

Updated June 1, 2015:

You may encounter 121 error like:

mount error(121): Remote I/O error
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

It’s a Windows side issue, set following registry value to 3. This value tells Windows to prioritize file sharing over reducing memory usage.

HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\Size

Reboot (or just restart the “Server” service in services.msc). Your problem should now be solved.

See: https://boinst.wordpress.com/2012/03/20/mount-cifs-cannot-allocate-memory-mounting-windows-share/

Categories: Linux Tags: