LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-24-2015, 12:55 PM   #1
raphael75
Member
 
Registered: Jul 2012
Posts: 37

Rep: Reputation: Disabled
Trying to add share to /etc/fstab with spaces in password


I'm trying to add a share to /etc/fstab, but the account I need to connect with has spaces in the password, and mount doesn't like it. How do I format this?

//195.212.215.32/myshare /mnt/hdrive cifs exec,iocharset=utf8,username=ralph,password=This password is very long
 
Old 07-24-2015, 01:21 PM   #2
fatmac
Senior Member
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: AntiX & Vuu-Do.
Posts: 1,857

Rep: Reputation: Disabled
Likely you can use a ? where the space would be, or prefix the space with \.
(Normally works for problem filenames.)
 
Old 07-24-2015, 02:11 PM   #3
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 3,519

Rep: Reputation: 1547Reputation: 1547Reputation: 1547Reputation: 1547Reputation: 1547Reputation: 1547Reputation: 1547Reputation: 1547Reputation: 1547Reputation: 1547Reputation: 1547
Try \040 for the space characters. That's the way to represent spaces in the mount point directory name. Hopefully it works for the mount options, too.
 
Old 07-24-2015, 05:53 PM   #4
Head_on_a_Stick
Senior Member
 
Registered: Dec 2014
Location: London, England
Distribution: Arch & Debian
Posts: 1,183

Rep: Reputation: 283Reputation: 283Reputation: 283
You could try adding the password to a file at /password in the form:
Code:
password=<password>
(Replace "<password>" with your password)

Then use this option instead of "password=":
Code:
credentials=/password
See mount.cifs(8)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] editing fstab - mount point with spaces vincix Linux - Newbie 5 11-23-2012 04:09 AM
[SOLVED] can mount WinXP share but not Win7 share in fstab dodgefan Linux - Server 9 06-13-2010 07:45 PM
Problem - Samba path in fstab has spaces for my WindowsXP machine ylikone Linux - Networking 2 08-01-2006 09:02 AM
smbfs, fstab, spaces in the folder i want to mount. Problems! JapanFred Linux - Networking 1 12-29-2005 03:27 PM
fstab and a password containing spaces kodiakmook Linux - General 2 05-15-2002 11:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration