openSUSE Forums > Network/Internet » Mounting remote fliesystems - Permanent or temporary?

Go Back   openSUSE Forums > Network/Internet
Forums FAQ Members List Search Today's Posts Mark Forums Read


Network/Internet Questions about internet applications, network configuration, usage (SAMBA, network printing, NFS)

Reply
Page 2 of 2 1 2
 
LinkBack Thread Tools Display Modes
  #11 (permalink)  
Old 07-Jul-2009, 11:26
Flux Capacitor Penguin
 
Join Date: Jun 2008
Location: GMT+10
Posts: 5,232
ken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud of
Default Re: Mounting remote fliesystems - Permanent or temporary?

It went through all the lines in smbfstab and didn't find a valid one. Did you end that active line with an end of line? Add a blank line to the end just to make sure of that. Also are you editing the right smbfstab? It's in /etc/samba/smbfstab, not /etc/smbfstab. I notice that it went through the loop 12 times. That is exactly how many lines there are in the unmodified version. So I bet you didn't edit /etc/samba/smbfstab at all.
Reply With Quote
  #12 (permalink)  
Old 07-Jul-2009, 12:07
suse_tpx60s's Avatar
Busy Penguin
 
Join Date: May 2009
Location: EU
Posts: 457
suse_tpx60s hasn't been rated much yet
Default Re: Mounting remote fliesystems - Permanent or temporary?

Ahah! Adding the blank line to the end of the smbfstab got a completely different output now. Yes, I am editing the correct smbfstab. I looked to make sure and don't have a /etc/smbfstab.
Here is the output now. Still looping 12 times.
Code:
sh -x /etc/init.d/smbfs start                           
+ . /etc/rc.status                                                             
++ LC_ALL=POSIX                                                                
++ export LC_ALL                                                               
++ trap rc_lc SIGWINCH                                                         
++ rc_lc                                                                       
++ test -n ''                                                                  
+++ stty size                                                                  
++ set -- 32 79                                                                
++ LINES=32                                                                    
++ COLUMNS=79                                                                  
++ test 32 -eq 0                                                               
++ test 79 -eq 0                                                               
++ export LINES COLUMNS                                                        
++ case ":$PATH:" in                                                           
++ test -t 1 -a xterm '!=' raw -a xterm '!=' dumb                              
++ stty size                                                                   
+++ echo -en '\033'                                                            
++ esc=$'\E'                                                                   
++ extd=''                                                                     
++ warn=''                                                                     
++ done=''                                                                     
++ attn=''                                                                     
+++ echo -en '\017'                                                            
++ norm=''                                                                     
+++ echo -en '\015                                                  '          
++ stat='                                                           '          
++ rc_done='                                                        done'      
++ rc_running='                                                     running'   
++ rc_failed='                                                      failed'    
++ rc_missed='                                                      missing'   
++ rc_skipped='                                                     skipped'   
++ rc_dead='                                                        dead'      
++ rc_unused='                                                      unused'    
++ rc_unknown='                                                     failed''   
++ rc_reset=''p='                                                              
++ rc_save=''                                                                  
++ rc_restor'='                                                                
++ _rc_service=/etc/init.d/smbfs                                               
++ _rc_status=0                                                                
++ _rc_status_all=0                                                            
++ _rc_todo=start                                                              
++ test start = status                                                         
++ test -n start                                                               
++ cmdline=                                                                    
+ rc_reset                                                                     
+ _rc_status=0                                                                 
+ _rc_status_all=0                                                             
+ rc_check                                                                     
+ _rc_status_ret=0                                                             
+ test 0 -eq 0                                                                 
+ test 0 -eq 0                                                                 
+ return 0                                                                     
+ return 0                                                                     
+ LC_ALL=en_US                                                                 
+ SMBFSTAB=/etc/samba/smbfstab                                                 
+ SMB_CONF=/etc/samba/smb.conf                                                 
+ SMBFS_STATE_FILE=/var/lock/subsys/smbfs                                      
+ SLEEP=1                                                                      
+ TIMEOUT=10                                                                   
+ grep -q ' cifs ' /proc/mounts                                                
+ test 1 -eq 0                                                                 
+ smbfs_used=no                                                                
+ case "$1" in                                                                 
+ grep -q '^[[:space:]]*[^#].*[[:space:]]cifs[[:space:]]' /etc/fstab           
+ rc=1                                                                         
+ '[' '!' -f /etc/samba/smbfstab -a 1 -ne 0 ']'                                
+ echo -n 'Mount CIFS File Systems '                                           
Mount CIFS File Systems + service_used=no                                      
+ '[' 1 -eq 0 ']'                                                              
+ timer=-1                                                                     
+ test -e /etc/samba/smbfstab                                                  
+ read service mountpoint vfstype options                                      
+ case "${service}" in                                                         
+ continue                                                                     
+ read service mountpoint vfstype options                                      
+ case "${service}" in                                                         
+ continue                                                                     
+ read service mountpoint vfstype options                                      
+ case "${service}" in                                                         
+ continue                                                                     
+ read service mountpoint vfstype options                                      
+ case "${service}" in                                                         
+ continue                                                                     
+ read service mountpoint vfstype options                                      
+ case "${service}" in                                                         
+ continue                                                                     
+ read service mountpoint vfstype options                                      
+ case "${service}" in                                                         
+ continue                                                                     
+ read service mountpoint vfstype options                                      
+ case "${service}" in                                                         
+ continue                                                                     
+ read service mountpoint vfstype options                                      
+ case "${service}" in                                                         
+ continue                                                                     
+ read service mountpoint vfstype options                                      
+ case "${service}" in                                                         
+ continue                                                                     
+ read service mountpoint vfstype options                                      
+ case "${service}" in                                                         
+ continue                                                                     
+ read service mountpoint vfstype options                                      
+ case "${service}" in                                                         
+ '[' cifs '!=' cifs -a -z 'username="user name",password=password' ']'      
+ '[' -z 'username="user name",password=password' ']'                        
+ '[' -1 -eq -1 ']'                                                            
+ echo -en 'from /etc/samba/smbfstab \n'                                       
from /etc/samba/smbfstab                                                       
+ timer=0                                                                      
++ echo /windows/Lacie                                                         
++ sed 's/\/*$//'                                                              
+ mountpoint=/windows/Lacie                                                    
+ grep -q '[[:space:]]/windows/Lacie[[:space:]]' /proc/mounts                  
+ service_used=yes                                                             
+ echo -n '//xxx.xxx.xxx.xxx/Lacie on /windows/Lacie type cifs '                  
//xxx.xxx.xxx.xxx/Lacie on /windows/Lacie type cifs + rc_reset                    
+ _rc_status=0                                                                 
+ _rc_status_all=0                                                             
+ rc_check                                                                     
+ _rc_status_ret=0                                                             
+ test 0 -eq 0                                                                 
+ test 0 -eq 0                                                                 
+ return 0                                                                     
+ return 0                                                                     
+ timer=10                                                                     
+ JOBS=none                                                                    
+ printdot=
Splitting as it's too long for one post
__________________
IBM Thinkpad X60s | Intel L2400 | Intel 945GM | 3GB | openSuSE 11.1 | KDE4.3.3
ASUS
M3N78 | AMD 64x2 5400+ | nvidia 8200+ | 2GB | openSUSE 11.2 | KDE4.3.3
Reply With Quote
  #13 (permalink)  
Old 07-Jul-2009, 12:07
suse_tpx60s's Avatar
Busy Penguin
 
Join Date: May 2009
Location: EU
Posts: 457
suse_tpx60s hasn't been rated much yet
Default Re: Mounting remote fliesystems - Permanent or temporary?

And the rest of it.
Code:
+ '[' none ']'                                                                 
+ '[' 10 -gt 0 ']'                                                             
+ '[' -z '' ']'                                                                
+ mount -t cifs -o 'username="user' 'name",password=password' //xxx.xxx.xxx.xxx/Lacie /windows/Lacie                                                           
Usage: mount -V                 : print version                                
       mount -h                 : print this help                              
       mount                    : list mounted filesystems                     
       mount -l                 : idem, including volume labels                
So far the informational part. Next the mounting.                              
The command is `mount [-t fstype] something somewhere'.                        
Details found in /etc/fstab may be omitted.                                    
       mount -a [-t|-O] ...     : mount all stuff from /etc/fstab              
       mount device             : mount device at the known place              
       mount directory          : mount known device here                      
       mount -t type dev dir    : ordinary mount command                       
Note that one does not really mount a device, one mounts                       
a filesystem (of the given type) found on the device.                          
One can also mount an already visible directory tree elsewhere:                
       mount --bind olddir newdir                                              
or move a subtree:                                                             
       mount --move olddir newdir                                              
One can change the type of mount containing the directory dir:                 
       mount --make-shared dir                                                 
       mount --make-slave dir                                                  
       mount --make-private dir                                                
       mount --make-unbindable dir                                             
One can change the type of all the mounts in a mount subtree                   
containing the directory dir:                                                  
       mount --make-rshared dir                                                
       mount --make-rslave dir                                                 
       mount --make-rprivate dir                                               
       mount --make-runbindable dir                                            
A device can be given by name, say /dev/hda1 or /dev/cdrom,                    
or by label, using  -L label  or by uuid, using  -U uuid .                     
Other options: [-nfFrsvw] [-o options] [-p passwdfd].                          
For many more details, say  man 8 mount .                                      
+ PID=16115                                                                    
+ test -e /proc/16115                                                          
+ JOBS=                                                                        
+ '[' '' ']'                                                                   
+ '[' '' ']'                                                                   
+ test ''
+ '[' '' -a 10 -eq 0 ']'
+ rc_status -v
+ rc_check
+ _rc_status_ret=0
+ test 0 -eq 0
+ test 0 -eq 0
+ return 0
+ test 0 -gt 7
+ _rc_status_ret=0
+ case "$_rc_todo" in
+ local i
+ for i in '"$@"'
+ case "$i" in
+ local vrt=
+ local out=1
+ local opt=en
+ test -n ''
+ opt=e
+ case "$_rc_status" in
+ vrt='                                                             done'
+ echo -e ''                                                        done
                                                                    done
+ _rc_status=0
+ return 0
+ read service mountpoint vfstype options
+ test yes = no
+ touch /var/lock/subsys/smbfs
+ rc_exit
+ exit 0
Here is my smbfstab
Code:
# This file allows you to mount SMB/ CIFS shares during system boot while
# hiding passwords to other people than root.  Use /etc/fstab for public
# available services.  You have to specify at least a service name and a mount
# point.  Current default vfstype is smbfs.
#
# Possible vfstypes are smbfs and cifs.
#
# The options are explained in the manual page of smbmount and mount.cifs.
#
# service                   moint-point     vfstype    options
//xxx.xxx.xxx.xxx/Lacie       /windows/Lacie      cifs    username="user name",password=password
__________________
IBM Thinkpad X60s | Intel L2400 | Intel 945GM | 3GB | openSuSE 11.1 | KDE4.3.3
ASUS
M3N78 | AMD 64x2 5400+ | nvidia 8200+ | 2GB | openSUSE 11.2 | KDE4.3.3
Reply With Quote
  #14 (permalink)  
Old 07-Jul-2009, 17:22
Flux Capacitor Penguin
 
Join Date: Jun 2008
Location: GMT+10
Posts: 5,232
ken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud of
Default Re: Mounting remote fliesystems - Permanent or temporary?

The problem is the space in your username. You'll have to escape it like this for the sake of the smbfs script:

username=user\ name,password=password
Reply With Quote
  #15 (permalink)  
Old 08-Jul-2009, 02:15
suse_tpx60s's Avatar
Busy Penguin
 
Join Date: May 2009
Location: EU
Posts: 457
suse_tpx60s hasn't been rated much yet
Default Re: Mounting remote fliesystems - Permanent or temporary?

Quote:
Originally Posted by ken_yap View Post
The problem is the space in your username. You'll have to escape it like this for the sake of the smbfs script:

username=user\ name,password=password
Almost. Finally, username=user\040name,password=password, did the trick.
Thanks.
__________________
IBM Thinkpad X60s | Intel L2400 | Intel 945GM | 3GB | openSuSE 11.1 | KDE4.3.3
ASUS
M3N78 | AMD 64x2 5400+ | nvidia 8200+ | 2GB | openSUSE 11.2 | KDE4.3.3
Reply With Quote
  #16 (permalink)  
Old 08-Jul-2009, 04:11
suse_tpx60s's Avatar
Busy Penguin
 
Join Date: May 2009
Location: EU
Posts: 457
suse_tpx60s hasn't been rated much yet
Default Re: Mounting remote fliesystems - Permanent or temporary?

OK, here is an update for anyone interested. It appears that there is a mixture of the two ways that you need to escape the space depending on whether it's a space in the path or username.

I found that for my smbfstab to work I had to do the following:
Path spaces are escaped as:- /path\ name/
Username spaces are escaped as:- user\040name

Below is my smbfstab
Code:
//xxx.xxx.xxx.xxx/Data\ I            /windows/DataI       cifs    username=User\040Name,password=password,uid=1000,gid=100,umask=0022

//xxx.xxx.xxx.xxx/Data\ II           /windows/DataII      cifs    username=User\040Name,password=password,uid=1000,gid=100,umask=0022

//xxx.xxx.xxx.xxx/LaCie              /windows/Lacie       cifs    username=User\040Name,password=password,uid=1000,gid=100,umask=0022

//xxx.xxx.xxx.xxx/LaCie\ Media       /windows/LacieMedia  cifs    username=User\040Name,password=password,uid=1000,gid=100,umask=0022
__________________
IBM Thinkpad X60s | Intel L2400 | Intel 945GM | 3GB | openSuSE 11.1 | KDE4.3.3
ASUS
M3N78 | AMD 64x2 5400+ | nvidia 8200+ | 2GB | openSUSE 11.2 | KDE4.3.3
Reply With Quote
  #17 (permalink)  
Old 08-Jul-2009, 04:25
Flux Capacitor Penguin
 
Join Date: Jun 2008
Location: GMT+10
Posts: 5,232
ken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud of
Default Re: Mounting remote fliesystems - Permanent or temporary?

Quote:
Originally Posted by suse_tpx60s View Post
OK, here is an update for anyone interested. It appears that there is a mixture of the two ways that you need to escape the space depending on whether it's a space in the path or username.

I found that for my smbfstab to work I had to do the following:
Path spaces are escaped as:- /path\ name/
Username spaces are escaped as:- user\040name

Below is my smbfstab
Code:
//xxx.xxx.xxx.xxx/Data\ I            /windows/DataI       cifs    username=User\040Name,password=password,uid=1000,gid=100,umask=0022

//xxx.xxx.xxx.xxx/Data\ II           /windows/DataII      cifs    username=User\040Name,password=password,uid=1000,gid=100,umask=0022

//xxx.xxx.xxx.xxx/LaCie              /windows/Lacie       cifs    username=User\040Name,password=password,uid=1000,gid=100,umask=0022

//xxx.xxx.xxx.xxx/LaCie\ Media       /windows/LacieMedia  cifs    username=User\040Name,password=password,uid=1000,gid=100,umask=0022
Actually, this is a bug. I have reported it, see

https://bugzilla.novell.com/show_bug.cgi?id=460793

Hopefully it will get fixed by 11.2. Or you can patch your smbfs script as shown. Also, I suspect you may also be able to use \040 in the service name.
Reply With Quote
  #18 (permalink)  
Old 08-Jul-2009, 05:04
suse_tpx60s's Avatar
Busy Penguin
 
Join Date: May 2009
Location: EU
Posts: 457
suse_tpx60s hasn't been rated much yet
Default Re: Mounting remote fliesystems - Permanent or temporary?

Thanks. I did wonder why there were two methods of escaping a space.
__________________
IBM Thinkpad X60s | Intel L2400 | Intel 945GM | 3GB | openSuSE 11.1 | KDE4.3.3
ASUS
M3N78 | AMD 64x2 5400+ | nvidia 8200+ | 2GB | openSUSE 11.2 | KDE4.3.3
Reply With Quote
Reply
Page 2 of 2 1 2

Bookmarks


Thread Tools
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
Trackbacks are On
Pingbacks are On
Refbacks are On




 

Search Engine Friendly URLs by vBSEO 3.3.0 RC2