Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Servers & Networking
FedoraForum Search

Forgot Password? Join Us!

Servers & Networking Discuss any Fedora server problems and Networking issues such as dhcp, IP numbers, wlan, modems, etc.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 27th June 2012, 01:28 AM
sea's Avatar
sea Online
"Shells" (of a sub world)
 
Join Date: May 2011
Location: Helvetic Federation (Swissh)
Age: 33
Posts: 2,597
linuxchrome
[NAS] protected share cant be mounted with valid credentials file

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...
__________________
Fedora Manual: http://docs.fedoraproject.org
Script-Tools: https://sourceforge.net/projects/script-tools/
sudo st tweak repo toggle livna ; st iso dl-fed && st iso usb

Last edited by sea; 27th June 2012 at 01:37 AM.
Reply With Quote
Reply

Tags
credentials, file, mounted, nas, protected, share, valid

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
File Gets Password Protected tmort Using Fedora 2 23rd March 2010 01:45 AM
Browsing SMB share creates a mounted file system? Brent Gardner Using Fedora 1 19th December 2008 07:07 PM
Windows says Samba share is write protected aaronmac3232 Servers & Networking 8 9th May 2006 10:36 PM
.wma DRM protected file playback. explosive Using Fedora 0 4th April 2005 11:08 PM


Current GMT-time: 15:15 (Saturday, 18-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat