The file you should be editing is: /home/your_username/.smb_credentials
And you need to make sure the /etc/init.d/mount_shares_locally file uses your_username on line 12:
username="your_username"
username="your_username"
username=<eldano>
password=<*my'eldano' password (not root password)*>
domain=HOME
#!/bin/sh
#
### BEGIN INIT INFO
# Provides: mount_shares_locally
# Required-Start: $network $local_fs $remote_fs smb mysqld
# Required-Stop: $network $local_fs $remote_fs smb
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: mount Samba shares locally
### END INIT INFO
username="eldano"
if [ -f /etc/rc.d/init.d/functions ]; then
. /etc/rc.d/init.d/functions
fi
start () {
uid=`id -u $username`
gid=`id -g $username`
echo -n $"Mounting Samba shares locally: "
mkdir -p /mnt/samba/
cd /mnt/samba/
mysql -u root -phda -e "select comment from shares" hda_production | grep -v "^comment$" | xargs -d "\n" mk$
ls -1 | while read d; do
/sbin/mount.cifs "//127.0.0.1/$d" "$d" -o credentials=/home/${username}/.smb_credentials,uid=${uid}$
done
touch /var/lock/subsys/mount_shares_locally
success $"$base startup"
echo
return 0
}
stop () {
echo -n $"Unmounting locally mounted Samba shares: "
/bin/umount -l /mnt/samba/*
rm -f /var/lock/subsys/mount_shares_locally
success $"$base shutdown"
echo
return 0
}
restart () {
stop
start
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
*)
echo $"Usage: $0 {start|stop|restart}"
exit 1
;;
esac
exit $?
And when I am root it gives the error like before:[eldano@localhost ~]$ service mount_shares_locally start
Mounting Samba shares locally: mount error(1): Operation not permitted
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
mount error(1): Operation not permitted
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
mount error(1): Operation not permitted
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
mount error(1): Operation not permitted
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
mount error(1): Operation not permitted
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
mount error(1): Operation not permitted
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
mount error(1): Operation not permitted
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
touch: cannot touch `/var/lock/subsys/mount_shares_locally': Permission denied
[ OK ]
Maybe this will help.[root@localhost ~]# service mount_shares_locally start
Mounting Samba shares locally: mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
[ OK ]
Code: Select all
username=eldano
password=some_password
domain=HOME
What I did:Example of using Terminal to move files from one share to another, when shares are mounted locally on the HDA:
- From client computer: ssh hda
- In SSH on HDA: mv /mnt/samba/torrents/SomeThing /mnt/samba/Movies/HD/
That's it.
But the directory is copied to the new location. But not removed from the torrents share. Why? I don't know.[eldano@localhost samba]$ mv /mnt/samba/Torrents/SomeDirectory/ /mnt/samba/Movies/
mv: cannot remove `/mnt/samba/Torrents/SomeDirectory/Sample.mkv': Permission denied
mv: cannot remove `/mnt/samba/Torrents/SomeDirectory/file.mkv': Permission denied
mv: cannot remove `/mnt/samba/Torrents/SomeDirectory/file.nfo': Permission denied
Code: Select all
cp -r /mnt/samba/Torrents/SomeDirectory /mnt/samba/Movies/
Users browsing this forum: No registered users and 53 guests