System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

Mount cifs share with space in the name?

richtl
Advisor

Mount cifs share with space in the name?

I'm trying to mount a windows share with a space in the share name on an 11v3 Integrity server. The following works fine:

$ cifsmount '//nedfile1/is dept' /mnt/smb -U mylogon

How do I add this to my fstab? The following definitely doesn't work:

'//nedfile1/is dept' /mnt/smb smbfs username=mylogon 0 0

$ mount /mnt/smb
mount: ignoring incomplete/incorrect entry for //nedfile1/is in /etc/fstab

(In linux, I'd use \040 for the whitespace, but that doesn't work in UX).
8 REPLIES
Shibin_2
Honored Contributor

Re: Mount cifs share with space in the name?

Please use escape codes.

i.e. \040 in place of the space. Your fstab will be like this.

//nedfile1/is\040dept /mnt/smb smbfs username=mylogon 0 0
Regards
Shibin
richtl
Advisor

Re: Mount cifs share with space in the name?

//nedfile1/is\040dept' /mnt/smb smbfs username=mylogon 0 0

$ sudo mount /mnt/smb

mount: //nedfile1/is\040dept: No such file or directory

Like I said...
Shibin_2
Honored Contributor

Re: Mount cifs share with space in the name?

I think, you missed something here.

is this nedfile1 is your windows server name?

I guess, it should be like this in fstab

:/ cifs ,

Try this way.
Regards
Shibin
richtl
Advisor

Re: Mount cifs share with space in the name?

Appreciate your help, Shibin.

I can do this:

sudo mount -F cifs "nedfile1:/is dept" /mnt/smb

and I can access the share and "cifslist" shows the mount and logged in users.

:/ cifs ,

I added

nedfile1:/is\040dept /mnt/unix_monitor cifs defaults 0 0

and I can't access the share. mount shows

/mnt/smb on nedfile1:/is:/ soft,novj,retrans=3,timeo=50,acregmin=1,acregmax=1,acdirmin=1,acdirmax=1,proto=udp,NFSv3,dev=13 on Tue Nov 16 10:18:08 2010

which is incorrect.

cifstlist shows
Mounted Object Mountpoint State
-------------------------------------------------------------------------------
\\NEDFILE1\IS\040DEPT /mnt/smb M
Steven E. Protter
Exalted Contributor

Re: Mount cifs share with space in the name?

Shalom,

Very interesting issue.

/mnt/smb on nedfile1:/is:/ soft,novj,retrans=3,timeo=50,acregmin=1,acregmax=1,acdirmin=1,acdirmax=1,proto=
udp,NFSv3,dev=13 on Tue Nov 16 10:18:08 2010

which is incorrect.

cifstlist shows
Mounted Object Mountpoint State
-------------------------------------------------------------------------------
\\NEDFILE1\IS\040DEPT /mnt/smb M

Radical approach: Talk to the Windows admin about not using white spaces in share names?

swlist -l product | grep -i cifs

Lets see if updating the cifs client might have an impact.

Whitespace should be something you can handle and cifslist output is handling this so it appears.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
richtl
Advisor

Re: Mount cifs share with space in the name?

> Radical approach: Talk to the Windows admin
> about not using white spaces in share names?

I'd rather pull my fingernails out one at a time.

Actually, there's so much legacy stuff attached to these shares they'll never get changed.

swlist -l product | grep -i cifs

CIFS-CLIENT A.02.02.02 HP CIFS Client
richtl
Advisor

Re: Mount cifs share with space in the name?

Looks like I'm at the current available rev.

https://h20392.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=B8724AA

Thanks for your help, btw.
richtl
Advisor

Re: Mount cifs share with space in the name?

Never did get this figured out. Instead using a cronjob to mount the share, run the job (cfg2html), then umount the share.