Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

I'm trying to do a connection for my work computers d: from my laptop. Altough to have direct access to the disk I need to use the computers administrator account. And I would not like to save the password for the administrator account in fstab file on my laptop.

# work share
//$         /home/user/domain/d   smbfs username=administrator,domain=domain,user,rw,noauto  0  0

This is how it looks in the terminal

$ mount ~/npn/d

And I get the thing mounted in no time.

Now to the trouble: If I try to "click" the d "drive" in the file browser I'm met by this error box:

Unable to mount d
Password: mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

Logic, because the graphical interface can't throw me a password login promt like the terminal.

Is there any way for me to solve this problem, to just be able to "click" on the unmounted d drive and get a GUI passpromt thrown?

share|improve this question

2 Answers 2

You have two options:

  1. I believe you are being asked the SAMBA password, so add in the password to the fstab entry:


    If you do not want the password in fstab, use a credentials file as described in this blog entry.

    Run the following commands as root, but change the path as you see fit:

    mkdir -p /path/securedir
    chmod 0700 /path/securedir
    chown root /path/securedir

    Then create a file /path/securedir/fileshare with the following contents:


    Now append credentials=/path/securedir/fileshare to your fstab entry.

  2. Your other option, and the one I use, is autofs. It takes a little time to configure, but it is mounted on demand and is invisible to the end user.

share|improve this answer
wouldn't it be better to quote relevant parts from the linked content? Especially with the credential file? The reason the credential files are superior to throwing it into the fstab is because fstab can usually be read by anyone, whereas the credential file can be protected extra. –  0xC0000022L Apr 9 '13 at 22:06
Depends on what the OP wants, I can flesh out the answer –  bodhi.zazen Apr 9 '13 at 23:01

bodhi.zazen: I believe you are being asked the SAMBA password

Yes it's the samba password that is being asked for in the terminal. There doesn't seem to be a good solution to bringing a GUI popup to enter the SAMBA password. And since I don't want to save the password in either credential file, fstab or individual autofs files. I will live with it as it is and start a terminal and write:

mount ~/npn/d

and then enter the SAMBA password in the terminal.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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