LinuxQuestions.org
Review your favorite Linux distribution.
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 02-10-2008, 04:32 PM   #1
kiwidesign
LQ Newbie
 
Registered: Feb 2008
Posts: 3

Rep: Reputation: 0
mount -cifs giving read only error


Hi all,

I am trying to mount using

mount -t cifs -o username=DOMAIN/your-username //iptocomputer/driveletter /mnt/mail

I get the following error

mount: block device //iptocomputer/driveletter is write-protected, mounting read only
mount: cannot mount block device //iptocomputer/driveletter read-only

this results in nothing being mounted on /mnt/mail

Any ideas of what I have wrong in my command.

Thanks
Kate
 
Old 02-11-2008, 09:36 AM   #2
snowman81
Member
 
Registered: Aug 2006
Location: Michigan
Distribution: Ubuntu
Posts: 242

Rep: Reputation: 30
Have you tried adding sudo to the front of it? Or I know in knoppix if you try to mount something, there is an option to make it readable. Could that be the problem?
 
Old 02-11-2008, 04:04 PM   #3
kiwidesign
LQ Newbie
 
Registered: Feb 2008
Posts: 3

Original Poster
Rep: Reputation: 0
Question

I don't believe that I need sudo in front of it as i'm logged in as root.

What is the appropriate switch to make it readable for cifs?

Thanks
Kate
 
Old 02-11-2008, 07:33 PM   #4
SlowCoder
Member
 
Registered: Oct 2004
Location: Southeast, U.S.A.
Distribution: Fedora (Desktop), CentOS (Server), Knoppix (Diags)
Posts: 934

Rep: Reputation: 38
Are you being prompted for a password? If not, you aren't authenticating properly.
 
Old 02-11-2008, 07:46 PM   #5
kiwidesign
LQ Newbie
 
Registered: Feb 2008
Posts: 3

Original Poster
Rep: Reputation: 0
I have also tried but it gave the same error - when I do it without password it does not ask me for password
mount -t cifs -o username=DOMAIN/your-username%password //iptocomputer/driveletter /mnt/mail
 
Old 02-11-2008, 09:36 PM   #6
SlowCoder
Member
 
Registered: Oct 2004
Location: Southeast, U.S.A.
Distribution: Fedora (Desktop), CentOS (Server), Knoppix (Diags)
Posts: 934

Rep: Reputation: 38
Quote:
Originally Posted by kiwidesign View Post
I have also tried but it gave the same error - when I do it without password it does not ask me for password
mount -t cifs -o username=DOMAIN/your-username%password //iptocomputer/driveletter /mnt/mail
I've never tried your mount format before. Can you try:
mount -t cifs //iptocomputer/driveletter /mnt/mail -o username=your-username,password=your-password
 
Old 07-13-2010, 11:56 PM   #7
gcmartin
LQ Newbie
 
Registered: Aug 2001
Posts: 14

Rep: Reputation: 0
Solution ===> mount -cifs giving read only error

Your problem is that your username+password on the system you are issuing the "mount ..." from, DOES NOT MATCH THE ONE ON THE SYSTEM YOU ARE TRYING TO CONNECT TO!
  1. Let's assume that the PC that you are typing the mount command is "system #1"
  2. Let's assume that the PC that you are trying to connect to is "system #2"
At system #2
Go to your system #2 that you are trying to connect to and do the following:
  1. Open a terminal windows
  2. add a user+password that matches the one in mount command on system #1 by typing smbpasswd username
  3. you will be prompted for password for this user, so make sure that the password (and username) is EXACTLY the same as in your mount command
At system #1
Go back to system #1 and re-enter your mount command as you did before.
 
Old 07-14-2010, 09:04 AM   #8
HasC
Member
 
Registered: Oct 2009
Location: South America - Paraguay
Distribution: Debian 5 - Slackware 13.1 - Arch - Some others linuxes/*BSDs through KVM and Xen
Posts: 329

Rep: Reputation: 55
Quote:
Originally Posted by gcmartin View Post
Your problem is that your username+password on the system you are issuing the "mount ..." from, DOES NOT MATCH THE ONE ON THE SYSTEM YOU ARE TRYING TO CONNECT TO!
  1. Let's assume that the PC that you are typing the mount command is "system #1"
  2. Let's assume that the PC that you are trying to connect to is "system #2"
At system #2
Go to your system #2 that you are trying to connect to and do the following:
  1. Open a terminal windows
  2. add a user+password that matches the one in mount command on system #1 by typing smbpasswd username
  3. you will be prompted for password for this user, so make sure that the password (and username) is EXACTLY the same as in your mount command
At system #1
Go back to system #1 and re-enter your mount command as you did before.
You don't need to have the same users/passwords on both machines so you can mount Windows/Samba fileshares. The OP justs needs to know username/password from the Windows machine, to mount its fileshares on her Linux - no need for smbpasswd on Linux.

Two questions for the OP:
  1. What distro/version are you running?
  2. The fileshare does permit read-write access? (have to ask, just in case)
 
Old 03-18-2013, 03:12 PM   #9
LinksExcellents
LQ Newbie
 
Registered: Mar 2013
Location: Mountain View, CA
Distribution: Centos, Ubuntu
Posts: 1

Rep: Reputation: Disabled
Wink

I know this is an old post but I just had the same issue and figured it out.

In my case I wasn't entering the password currently. (Classic User Error )

If anyone else has this issue I would recommend checking the share path, user and password.
 
Old 03-20-2014, 10:59 PM   #10
webdawg
LQ Newbie
 
Registered: Mar 2006
Posts: 4

Rep: Reputation: 0
Cifs

Make sure cifs utils and supporting are installed it is trying to mount the share as a block device and does not recognize the path as cifs
 
  


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
Cifs "mount error 13 = Permission denied" CIFS SUCKS humbletech99 Linux - Networking 44 02-26-2016 01:45 PM
mount.cifs - mount error 20 = Not a directory da_kidd_er Linux - Networking 10 10-16-2008 01:55 PM
cifs read error when accessing a samba mount mathfeel Linux - Networking 0 12-09-2006 03:18 AM
mount error with CIFS Sylak Linux - Networking 1 08-17-2006 02:44 PM
kernel 2.6.16.1 + cifs = Send error in read elfoozo Debian 2 04-09-2006 11:26 PM

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

All times are GMT -5. The time now is 09:08 PM.

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