Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I've created a script to mount the windows server network shares, but it keeps me asking for the network password. I've already tried setting the PASSWD env var and setting the password in the command.

Here's what I have:

sudo mount.cifs //IP/Utils /media/Data/Utils -o username=sergio, password=MyPassword..., uid=sergio, file_mod=0755, dir_mode=0755, gid=sergio, workgroup=myworkgroup

I tried also with sec=ntlm (looked at another question, don't remember where) but no avail.

Why it keeps me asking the password?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

From mount.cifs manpage:

Options to mount.cifs are specified as a comma-separated list of key=value pairs.

So there should be no space between the options, only commas:

sudo mount.cifs //IP/Utils /media/Data/Utils -o username=sergio,password=MyPassword...,uid=sergio,file_mode=0755,dir_mode=0755,gid=sergio,workgroup=myworkgroup
share|improve this answer
    
Sorry for the late reply, AskUbuntu didn't notified me [?]. I already tried that, it show's me mount error(22): Invalid argument –  Sérgio Michels Oct 1 '13 at 10:58
    
Ok, trimming white spaces and changing file_mod to file_mode do the trick. Thanks! –  Sérgio Michels Oct 1 '13 at 11:27

Your Answer

 
discard

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.