Hi
Probably a very basic issue caused by lazyness...
Written a script to mount my "shares" to local paths, it works for all public accessable shares,
but not for the restricted one, for which i have created a credentials file.
Reproducable:
Code:
[simon@nc210 ~]$ st dev nas 42 ma
# | Fedora : Script Tools 0.6.3 : (1000) 2012.06.27-02.02.25 | #
# | sea's Network-Attached Storage script tool (0.9) | #
# | st dev nas | #
Domain=[OCEAN] OS=[Unix] Server=[Samba 3.5.6]
Domain=[OCEAN] OS=[Unix] Server=[Samba 3.5.6]
# | Mounting: ./public to /home/simon/nas/public [DONE] | #
# | Mounting: ./priv to /home/simon/nas/priv [WORK] | #mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
# | Mounting: ./priv to /home/simon/nas/priv [FAIL] | #
# | Mounting: ./TimeMachine to /home/simon/nas/TimeMachine [DONE] | #
# | Mounting: ./Pictures to /home/simon/nas/Pictures [DONE] | #
# | Mounting: ./Music to /home/simon/nas/Music [DONE] | #
# | Mounting: ./Movies to /home/simon/nas/Movies [DONE] | #
# | Mounting: ./Linux to /home/simon/nas/Linux [DONE] | #
1) Exit
2) Single connection to 1 share on "deepthought"
3) Mount all shares on "deepthought" to "/home/simon/nas"
4) Debug
5) Edit NAS Settings
6) Edit smb.conf
7) Connect on boot
#? 2
1) public 3) TimeMachine 5) Music 7) Linux
2) priv 4) Pictures 6) Movies 8) back
#? 2
Domain=[OCEAN] OS=[Unix] Server=[Samba 3.5.6]
smb: \> ls
. D 0 Fri Jun 8 21:33:59 2012
.. D 0 Mon Jun 25 17:02:13 2012
.Trash-1000 DH 0 Fri May 18 23:47:23 2012
backups D 0 Tue May 22 13:18:47 2012
Fotos D 0 Mon May 7 01:55:13 2012
Logos D 0 Sat May 12 22:38:02 2012
edu D 0 Tue Jun 12 22:41:42 2012
simon-theme-infos.txt~ 42 Fri Jun 8 21:30:30 2012
simon-theme-infos.txt 79 Fri Jun 8 21:33:58 2012
58307 blocks of size 16777216. 49947 blocks available
smb: \> exit
#?
1) Exit
2) Single connection to 1 share on "deepthought"
3) Mount all shares on "deepthought" to "/home/simon/nas"
So at first i thought the credential file was corrupt, so i checked it:
Code:
username = simon
domain = ocean
password = password
Checked as well the hosts file:
Code:
192.168.abc.abc deepthought
But since i could access the restricted share with a direct connection, the credential file must be correct.
Actual mount command, that works for non-restricted (public) shares:
Code:
cmds="mount -t cifs //$nas_dev_name/$each $MOUNTPOINT/$each -o rw,soft,credentials=$SEA_NAS_DIR/$lbl.cred"
Where the direct connection was coded like:
Code:
$SMBC //$nas_dev_name/$share -A $SEA_NAS_DIR/$lbl.cred && \
return 0 || return 1
These code constructs were created by parsing down, one by one, by replace fixed strings with variables, and it ought to work previously (script version 0.5 - public).
However, its also another system (device) of where i wrote the script at first (0.5 - 0.7).
However re-reading the mount manual, maybe there's something i forgot to implement in the scripts, but missed to find or imply due to lack of feedback (sorry thats off topic, but must be said.)
EDIT:

lol

, renamed the .cred to .conf of the multiple share mount command line, as they store the same information in another format, and it worked.


Just weird that the direct connection to the share works with the actual credential file...