1

I would like to access and copy some files to an SMB share. These commands work with sudo, no username/password is needed:

mount.cifs //192.168.1.1/share ~/share/ -o rw
cp *pdf share/
umount share/

Is there a way to do this as non-root user?

1

Either you add a mount option

mount.cifs //192.168.1.1/share ~/share/ -o rw username=XYXY,password=XYXYXY

or you write a textfile

gedit ~/.smbcredentials

with the content:

username=XYXY

password=XYXYXY

After that type

sudo chmod 600 ~/.smbcredentials

Now try mounting:

mount.cifs //192.168.1.1/share ~/share/ -o rw credentials=~/.smbcredentials

For reference: http://forums.buffalotech.com/t5/Storage/Instructions-mount-Linkstation-shares-on-Linux-system-Ubuntu/td-p/63306

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.