LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-03-2020, 06:53 AM   #1
lelunicu
Member
 
Registered: Jun 2019
Posts: 105

Rep: Reputation: 0
cifs


hi,
i like to mount a cifs share in centos.

mount -t cifs -o vers=1.0,_netdev,username=y,password=y,uid=1000,gid=1000,ip=192.168.30.149 //100.93.214.220/cifs /home/y
Unable to find suitable address.

mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

i understand that in cifs case when share directory is shared to everyone,then normally no uid,gid in linux is needed.right?
yet uid,gid is needed in mount in order to have mount point rw.right?

so in my case user y will has rw access to cifs mounted under /home/y.

ping 100.93.214.220 -work.

//100.93.214.220/cifs work in window
i have everyone on the cifs with full access.

Last edited by lelunicu; 02-03-2020 at 06:57 AM.
 
Old 02-03-2020, 12:16 PM   #2
ebabin
LQ Newbie
 
Registered: May 2006
Posts: 2

Rep: Reputation: 0
I've had trouble with what I thought was the same syntax on different machines or versions. This is what currently works for me on both Fedora 30 machines:

mount -t cifs //192.168.1.10/Public /mnt -o username=me

It should prompt for a password.
 
Old 02-03-2020, 12:28 PM   #3
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,146
Blog Entries: 6

Rep: Reputation: 1834Reputation: 1834Reputation: 1834Reputation: 1834Reputation: 1834Reputation: 1834Reputation: 1834Reputation: 1834Reputation: 1834Reputation: 1834Reputation: 1834
You should be looking at a VPN. Or IPsec SFTP or SSH with keys.
Don't use CIFS over the internet.

But maybe some else knows more.

Code:
whois 100.93.214.220
...
NetRange:       100.64.0.0 - 100.127.255.255
CIDR:           100.64.0.0/10
NetName:        SHARED-ADDRESS-SPACE-RFCTBD-IANA-RESERVED
NetHandle:      NET-100-64-0-0-1
Parent:         NET100 (NET-100-0-0-0-0)
NetType:        IANA Special Use
https://networkengineering.stackexch...-100-64-0-0-10
 
Old 02-03-2020, 12:44 PM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,981

Rep: Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337Reputation: 7337
Quote:
Originally Posted by lelunicu View Post
hi,
i like to mount a cifs share in centos.

mount -t cifs -o vers=1.0,_netdev,username=y,password=y,uid=1000,gid=1000,ip=192.168.30.149 //100.93.214.220/cifs /home/y
Unable to find suitable address.

mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
Would be nice to post exactly what did you try and what's happened. In this case you need to check /var/log for related messages and also you need to check the other side for info. That may give you much better description.

You also need to check if that IP/port is reachable, if anything was shared on the other side (and also post the details = how and what was shared). Not to speak about firewalls, ports...

Quote:
Originally Posted by lelunicu View Post
i understand that in cifs case when share directory is shared to everyone,then normally no uid,gid in linux is needed.right?
In general false. uid and gid is required if there is a reason to do so, but in your case it is most probably irrelevant, that's why it is not really needed.
Quote:
Originally Posted by lelunicu View Post
yet uid,gid is needed in mount in order to have mount point rw.right?
no.
It depends on how the users and the share were configured on both sides, if AD (or something like that) was involved, if there is a domain and there are still some other ifs...

Quote:
Originally Posted by lelunicu View Post
so in my case user y will has rw access to cifs mounted under /home/y.
It looks like it is not correct, the user does not have any right currently.
Quote:
Originally Posted by lelunicu View Post
ping 100.93.214.220 -work.
This is great, but as you see it is more or less irrelevant too.
Quote:
Originally Posted by lelunicu View Post
//100.93.214.220/cifs work in window
i have everyone on the cifs with full access.
Obviously it does not mean anything if you won't specify the details. Is this another (or the same?) windows, or a lot of different hosts, who is that everyone? How (and where) are these users were configured? What do you mean by "on the cifs"?

Most probably your samba is not configured properly, but without info hard to say anything.

Last edited by pan64; 02-03-2020 at 12:46 PM.
 
Old 02-04-2020, 02:09 AM   #5
lelunicu
Member
 
Registered: Jun 2019
Posts: 105

Original Poster
Rep: Reputation: 0
hi,
my laptop loaded the profile from AD.I have windows 10.
I try to mount from a VM in my laptop a share created on my laptop.
Centos 7.
I created cifs share with everyone-full access.
From VM i tried to mount this share from command line-and first error was that in /etc/fstab is not specified any information regarding this cifs share. after i added input in /etc/fstab the error gone.why this requirement?
//100.93.214.220/cifs /home/y cifs rw,credentials=/root/nimic,mapchars,uid=y,gid=y,dir_mode=0750,file_mode=0640,_netdev,vers=1.0,ip=192.168.30.149 0 0

mount -t cifs -o vers=2.0,credentials=/root/nimic //100.93.214.220/cifs /home/y
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs

telnet 100.93.214.220 445
Trying 100.93.214.220...
Connected to 100.93.214.220.
Escape character is '^]'.

more /root/nimic
username=y
password=y

grep y /etc/passwd
y:x:1000:1000::/home/y:/bin/bash
tail /var/log/messages
Feb 4 03:09:06 cadcwebserver kernel: Status code returned 0xc000006d STATUS_LOGON_FAILURE
Feb 4 03:09:06 cadcwebserver kernel: CIFS VFS: Send error in SessSetup = -13
Feb 4 03:09:06 cadcwebserver kernel: CIFS VFS: cifs_mount failed w/return code = -13
 
  


Reply



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 45 04-06-2020 05:31 AM
manual mount cifs works but srcipt mount cifs has mount error (13): Permission denied CADIT Linux - Newbie 6 11-20-2009 02:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:20 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
Open Source Consulting | Domain Registration