problem mounting share with script

I found this script at

https://bbs.archlinux.org/viewtopic.php?id=105333

but it output this error

mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
unable to mount samba

this is how I have modify it

#!/bin/sh
echo “This is a custom script for mount network samba shares”
echo “****************************************”
echo " "
echo “Please insert domain password:”
read -s mypassword
echo " "
echo “|checking mount state…in share are not mounted mount it!|”
echo “±------------------------------------------------------------------------+”
if grep “samba” /etc/mtab &>/dev/null; then
grep “samba” /etc/mtab | awk ‘{print "samba is already mounted on " $2}’
else
sudo mount -t cifs -o username=‘eduardo’,password=“$mypassword” //10.0.2.15/Documentos /home/eduardo/samba && echo “samba is now mounted” || echo “unable to mount samba”
fi
echo " "
echo " "
echo “All DONE!”
echo " "
read -p “Press ENTER key to close this terminal”
exit

any ideas of why is not working?

ups I haven’t added the user with smbpasswd -a username, it is working now

sorry

On 2013-03-08 00:46, Easgs wrote:
>
> ups I haven’t added the user with smbpasswd -a username, it is working
> now

Ok.
But please, next time, post the script inside code tags. As you posted
it is unreadable because lines are wrapped round.

Advanced editor, ‘#’ button.
View this
thread for instructions


Cheers / Saludos,

Carlos E. R.
(from 11.4, with Evergreen, x86_64 “Celadon” (Minas Tirith))