0

I need to mount a samba share directory on Ubuntu 16.04. Although the samba share directory(served by a Ubuntu 12.04 machine) has no password protection, the mount command still prompts the password hint:

# mount //10.117.47.250/view ~/target
Password for root@/10.117.47.250/view:

To my surprise, it will mount the samba share directory successfully whatever I input after the password hint.

I found a solution that can disappear the password hint:

mount -o password= //10.117.47.250/view ~/target

Is there other solution can prohibit the password hint prompt?

1
  • Does this problem persist when you try it as a normal user? – dessert Dec 21 '17 at 10:22
1

Another solution is to have an entry in your /etc/fstab like:

//10.117.47.250/view /root/target cifs username=root,password=,iocharset=utf8,sec=ntlm  0  0

After that you should/would be able to mount it:

mount ~/target

In the above example anybody can see the password in /etc/fstab. It can be prevented by having the password in another file /etc/nsmb.conf:

[10.117.47.250:root]
password=

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.