Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I use the command and am prompted twice:

sudo mount //192.168.0.12/volume_1 /mnt/stableNas/
[sudo] password for {myUserName}: 
Password: 

I use the same password

This works great, but I am wondering why I have to type the password twice. I believe this is blocking my automount(now removed) that I have attempted in the past, but will save that for another question.

If I specify the -t option I use cifs and not smbfs.

This is from my auth.log:

Dec 30 15:11:07 pino sudo:  {myUserName} : TTY=pts/1 ; PWD=/home/{myUserName} ; USER=root ; COMMAND=/bin/mount //192.168.0.12/volume_1 /mnt/stableNas/
Dec 30 15:11:07 pino sudo: pam_unix(sudo:session): session opened for user root by {myUserName}(uid=0)
Dec 30 15:11:11 pino sudo: pam_unix(sudo:session): session closed for user root

Linux Mint Nadia with cinnamon

contents of fstab (although I don't think it is relevant, but I know it will be asked)

proc            /proc           proc    nodev,noexec,nosuid 0       0
UUID=fdd8cdb4-876a-4387-8aa0-0c9101d1b004     /ext4     errors=remount-ro 0 1
UUID=3fb319aa-7e96-49b5-a26f-27da6ce47187     /home     ext4 defaults     0 2
UUID=f756c855-5ed7-478d-9451-8b2b3ffd9ff8     /opt      ext4 defaults     0 2
UUID=83ac367a-7bf1-4495-bad7-1620ae5382d3     /srv      ext4 defaults     0 2
UUID=1cf91e67-6b32-4036-87cc-b296ab3f7984     /tmp      ext4 defaults     0 2
UUID=c2961ad5-2f1e-458c-b5ae-2eb397a8b548     /var      ext4 defaults     0 2
UUID=88ab57b9-291f-4250-8986-c5988d2070d4     none      swap sw           0 0
UUID=3c9654b4-fb32-4974-b4d4-ca525114b19d     /boot     ext4 defaults     0 2
UUID=308A-36A4                                /boot/efi vfat defaults     0 
share|improve this question

1 Answer 1

up vote 0 down vote accepted

So this one is pretty easy. The first time it's asking for a password, you're authenticating against sudo. Sudo does not pass this authentication onto the mount command (nor should it); if you execute the mount command from a root prompt (ie, 'sudo bash', enter password, then issue the mount command), you'll just need to type the password once (although you'll have already had to type it once to become root using sudo). If your root account has a password, you could instead login to a terminal as root or su to root, and the mount command will still require a password, because this password is used by SMB/CIFS for authentication.

share|improve this answer

Your Answer

 
discard

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