Sample Header Ad - 728x90

Unix & Linux Stack Exchange

Q&A for users of Linux, FreeBSD and other Unix-like operating systems

Latest Questions

1 votes
1 answers
1898 views
CIFS mount status
I have some embedded devices running Linux (4.14.126), and i want them to write some of their logfiles to a network share on another (Windows 10) computer. Mounting the network share works mostly fine, apart from the fact that i have to provide login credentials (which i wanted to avoid), but i need...
I have some embedded devices running Linux (4.14.126), and i want them to write some of their logfiles to a network share on another (Windows 10) computer. Mounting the network share works mostly fine, apart from the fact that i have to provide login credentials (which i wanted to avoid), but i need some reliable way to detect a broken mount (for example when i reboot the PC). - Is it possible to get some kind of status information for a cifs mount? - What error conditions (if any) can be detected without actually trying to read from (or write to) the share? - Is it possible for my application to get automatic notifications in case of an error (maybe through inotify)? - Do i have to handle remounting myself, or does that happen automatically once the share becomes available again? PS (in case it matters): I won't use fstab, because the location of the network share is not known at boot time.
Felix G (111 rep)
Jul 10, 2020, 07:59 AM • Last activity: Jul 24, 2025, 11:08 PM
14 votes
2 answers
13778 views
How to deal with freezes caused by autofs after network disconnect
I mount four servers (3 via `cifs`, 1 via `sshfs`) using `autofs`. `auto.master` /- /etc/auto.all --timeout=60 --ghost `auto.all ` /mnt \ /server1 -fstype=cifs,rw,credentials=/etc/.smbcredentials.txt,uid=1000,file_mode=0775,dir_mode=0775,users ://server1/ \ /server2/ -fstype=cifs,rw,credentials=/etc...
I mount four servers (3 via cifs, 1 via sshfs) using autofs. auto.master /- /etc/auto.all --timeout=60 --ghost auto.all /mnt \ /server1 -fstype=cifs,rw,credentials=/etc/.smbcredentials.txt,uid=1000,file_mode=0775,dir_mode=0775,users ://server1/ \ /server2/ -fstype=cifs,rw,credentials=/etc/.smbcredentials.txt,uid=1000,file_mode=0775,dir_mode=0775,users ://server2/ \ /server3 -fstype=cifs,rw,credentials=/etc/.smbcredentials.txt,uid=1000,file_mode=0775,dir_mode=0775,users ://server3/ \ /server4 -fstype=fuse,rw,allow_other,uid=1000,users,reconnect,cache=yes,kernel_cache,compression=no,large_read,Ciphers=arcfour :sshfs\#user@server\:/home ``` Everything is fine when I make a clean boot. I connect to my network (using a VPN) and autofs mounts everything. # Problem When there is a network disconnect, e.g. when I hibernate my laptop or connect to a different network, autofs causes my explorer (dolphin) to freeze because it tries to load the remote share infinitely. It becomes unresponsive and does not even react to SIGTERM commands. Sometimes I am lucky and calling sudo service autofs stop and sudo automount helps to resolve the issue. However, often it still stays freezed. Sometimes even, my whole dock freezes due to this making all applications unselectable. Then I have to make a full reboot.. I've searched for weeks now for solution how to deal with autofs in such situations. Before using autofs, I had everything mounted via /etc/fstab but that also required a manual remount after every network interruption. I thought autofs would help me here but it causes me even more trouble. # Questions 1. Is there any point I overlooked that could solve the freezing problem? 2. Is there a completely different approach that may be better suited for my situation than autofs? PS: I'm on Kubuntu 16.04
pat-s (348 rep)
Jan 9, 2018, 11:27 PM • Last activity: Jul 12, 2025, 11:09 AM
2 votes
2 answers
6357 views
DFS-Link failing when mounting DFS share via cifs
I'm trying to mount a DFS share via cifs. The share is built up like this: `\\mydomain.local\Files` is the DFS share. I can successfully mount this share as follows: ``` # mount -t cifs //mydomain.local/Files ~/fileserver -o username=myuser,domain=mydomain.local,password=hunter2 ``` After this I can...
I'm trying to mount a DFS share via cifs. The share is built up like this: \\mydomain.local\Files is the DFS share. I can successfully mount this share as follows:
# mount -t cifs //mydomain.local/Files ~/fileserver -o username=myuser,domain=mydomain.local,password=hunter2
After this I can traverse the directories in ~/fileserver as I'd expect.
# ls ~/fileserver
folder1 folder2
When I try to cd into folder1 however, I get an error:
# cd folder1
cd: folder1: No such file or directory
It takes a second or two before the error appears. I think this is because folder1 is a DFS-Link to another fileserver, it links to: \\fileserver2.mydomain.local\Fileshare$\somedirectory\folder1 Now I've looked at dmesg right after this:
# dmesg
CIFS: Attempting to mount //fileserver2.mydomain.local/Fileshare/somedirectory/folder1
No dialect specified on mount. Default has changed to a more secure dialect, SMB2.1 or later (e.g. SMB3), from CIFS (SMB1). To use the less secure SMB1 dialect to access old servers which do not support SMB3 (or SMB2.1) specify vers=1.0 on mount.
FS-Cache: Duplicate cookie detected
FS-Cache: O-cookie c=0000000088cf85cb [p=00000000a52bce0c fl=222 nc=0 na=1]
FS-Cache: O-cookie d=00000000ff7a58d3 n=000000005109413d
FS-Cache: O-key= '46696c6573'
FS-Cache: N-cookie c=00000000c39f9d7a [p=00000000a52bce0c fl=2 nc=0 na=1]
FS-Cache: N-cookie d=00000000ff7a58d3 n=00000000930f66cf
FS-Cache: N-key= '46696c6573'
No dialect specified on mount. Default has changed to a more secure dialect, SMB2.1 or later (e.g. SMB3), from CIFS (SMB1). To use the less secure SMB1 dialect to access old servers which do not support SMB3 (or SMB2.1) specify vers=1.0 on mount.
FS-Cache: Duplicate cookie detected
FS-Cache: O-cookie c=0000000088cf85cb [p=00000000a52bce0c fl=222 nc=0 na=1]
FS-Cache: O-cookie d=00000000ff7a58d3 n=000000005109413d
FS-Cache: O-key= '46696c6573'
FS-Cache: N-cookie c=000000007c6a3385 [p=00000000a52bce0c fl=2 nc=0 na=1]
FS-Cache: N-cookie d=00000000ff7a58d3 n=00000000f006535b
FS-Cache: N-key= '46696c6573'
No dialect specified on mount. Default has changed to a more secure dialect, SMB2.1 or later (e.g. SMB3), from CIFS (SMB1). To use the less secure SMB1 dialect to access old servers which do not support SMB3 (or SMB2.1) specify vers=1.0 on mount.
CIFS VFS: \\fileserver2.mydomain.local cannot query dirs between root and final path, enabling CIFS_MOUNT_USE_PREFIX_PATH
CIFS VFS: Autodisabling the use of server inode numbers on new server.
CIFS VFS: The server doesn't seem to support them properly or the files might be on different servers (DFS).
CIFS VFS: Hardlinks will not be recognized on this mount. Consider mounting with the "noserverino" option to silence this message.
CIFS VFS: cifs_read_super: get root inode failed
I believe the "cannot query dirs between root and final path" seems to be the actual problem, as I don't have permission to directly mount either the Share Fileshare$ or somedirectory, but only folder1. I could also directly mount this share on fileserver2, but since on the DFS there are many links to another server, I'd have to mount a whole lot of stuff. I'm in the lucky position to be able to try the mount with an elevated account that *can* access both Fileshare$and somedirectory and when I mount it with that user instead of "myuser", I can access folder1:
# mount -t cifs //mydomain.local/Files ~/fileserver -o username=adminuser,domain=mydomain.local,password=hunter2
# ls ~/fileserver/folder1
file1 file2 file3
But I can't use this elevated account for day to day work - also, I'm not in a position to change the permissions on the DFS share or the fileserver. The interesting part is that smbclient can do the traversal with myuser:
# smbclient '\\mydomain.local\Files' -U 'myuser@mydomain.local'
# smb: \> ls folder1
.
..
file1
file2
file3
I tried a lot of different options to the mount (mostly in desperation):
vers=1.0
vers=3.0
noserverino
sec=ntlmv2
sec=ntlmssp
Has anybody got any idea what else I could try? The DFS share is on a windows server by the way.
user460188
Mar 11, 2021, 09:12 AM • Last activity: Jul 12, 2025, 03:06 AM
3 votes
3 answers
2453 views
mount -t cifs fails if password is not read from prompt, how to fix?
I can successfully mount a windows network drive/share using this command: mount -t cfis //servername/sharename /mnt -o 'username=user,sec=ntlmssp' as running this commands prompts a password to be input and then if correct mounts. According to [`man mount.cifs`][1] I should be able to to this. moun...
I can successfully mount a windows network drive/share using this command: mount -t cfis //servername/sharename /mnt -o 'username=user,sec=ntlmssp' as running this commands prompts a password to be input and then if correct mounts. According to man mount.cifs I should be able to to this. mount -t cfis //servername/sharename /mnt -o 'username=user,password=pwd,sec=ntlmssp' or this PASSWD='pwd' mount -t cfis //servername/sharename /mnt -o 'username=user,sec=ntlmssp' However strangely both those commands fail with this message. mount error(13): Permission denied Now because our company does this "supersmart" thing to require passwords with **special characters** mine does contain a exclamation mark "!". I know that this would have a special meaning to the command line shell, so I have escaped it properly such that if my password was pwd! I would issue those two commands: PASSWD='pwd\!' mount -t cfis //servername/sharename /mnt -o 'username=user,sec=ntlmssp' mount -t cfis //servername/sharename /mnt -o 'username=user,password=pwd\!,sec=ntlmssp' but still it does not work. Connecting to Windows I do not have any particular feeling of urgency to hide my password (of appearing in the bash history) so I would be happy to find a way to skip the password prompt. Mostly I would like to know what the problem is? Lastly I have even tried a credentials file which also did not work.
fraleone (897 rep)
Dec 11, 2019, 03:04 PM • Last activity: Jul 11, 2025, 11:01 PM
0 votes
2 answers
2777 views
Access windows symbolic link from linux cifs
I have created symbolic link of the mapped drive (DOS share) on Windows 7 computer 200.90.12.25. The symbolic link was created using mklink command. Trying to access this from Linux (Raspberry PI) using CIFS command, I get `mount error(5): Input/output error`. CIFS command and dmesg attached below....
I have created symbolic link of the mapped drive (DOS share) on Windows 7 computer 200.90.12.25. The symbolic link was created using mklink command. Trying to access this from Linux (Raspberry PI) using CIFS command, I get mount error(5): Input/output error. CIFS command and dmesg attached below. I cannot access the DOS share from Linux because of NETBEUI. Line diagram shown below for reference. enter image description here **CIFS command** sudo mount -t cifs -o user=username,guest,vers=2.0 //200.90.12.25/DOSA /home/pi/myNAS/myShare **dmesg** (also on the Linux client) [1027098.510573] FS-Cache: Duplicate cookie detected [1027098.510583] FS-Cache: O-cookie c=c6d9fc6c [p=33027f2d fl=222 nc=2 na=1] [1027098.510588] FS-Cache: O-cookie d=e8ce4e52 n=203d934d [1027098.510592] FS-Cache: O-key= '020001bd0a090c12' [1027098.510606] FS-Cache: N-cookie c=435e27ec [p=33027f2d fl=2 nc=0 na=1] [1027098.510611] FS-Cache: N-cookie d=e8ce4e52 n=9f19c9a0 [1027098.510614] FS-Cache: N-key= '020001bd0a090c12' [1027098.515854] CIFS VFS: cifs_mount failed w/return code = -5 As per the suggested comments, i have tried below commands. I got the same mount error(5): Input/output error sudo mount -t cifs -o username=username,guest,vers=2.1,mfsymlinks //200.90.12.25/DOSA /home/pi/myNAS/myShare mount.cifs sudo mount.cifs //200.90.12.25/DOSA /home/pi/myNAS/myShare -o username=username,guest,domain=domain,mfsymlinks any alternative solution much appreciated.
Bhuvan Kumar (51 rep)
Aug 2, 2020, 09:33 AM • Last activity: Jun 30, 2025, 01:05 PM
0 votes
0 answers
44 views
Cannot open LibreOffice files on Samba share concurrently on Debian Linux - File locking issue
We have a Samba file server and use Debian Linux for both server and clients. Everything works fine. Except for one thing: If someone opens a LibreOffice document (mainly Calc / *.ods), nobody else can open the same file concurrently, not even "read only" or as a copy. If I try to open such a file,...
We have a Samba file server and use Debian Linux for both server and clients. Everything works fine. Except for one thing: If someone opens a LibreOffice document (mainly Calc / *.ods), nobody else can open the same file concurrently, not even "read only" or as a copy. If I try to open such a file, LibreOffice says it is locked by a certain named user or by an unknown user (the latter happens if I rm the ~lock. file). Then I can choose if I want to open the file read-only or if I want to work with a copy of the file. That's fine. But none of both options work! If I choose "open read only", nothing happens. If I choose "work with a copy", an empty Writer document opens up (although I tried to open an ods file with Calc). Next thing I tried: I can't even run md5sum document.ods! It says permission denied. So it's not just LibreOffice that cannot open the file for concurrent read access. LibreOffice seems to put an exclusive lock on the file when it is opened for editing. Nobody else can open the file until the first user closes the document. Any ideas what I could try? Preventing concurrent write access is reasonable. But why does it also block concurrent read access? And how can I disable that? getfacl output on the file server looks fine so far.
MrSnrub (145 rep)
Jun 25, 2025, 09:16 AM • Last activity: Jun 25, 2025, 10:59 AM
8 votes
2 answers
5344 views
"Only root can mount" error - but I am root
Yesterday I was able to mount my smb share with the following command: sudo mount -t cifs //XXXX/share /media/share -o user=Ben,password=XXX,workgroup=WORKGROUP,ip=XXX.XX.XX,uid=ben,gid=ben,rw I don't know why it is not working anymore. (Maybe from system update). I got the following error : mount:...
Yesterday I was able to mount my smb share with the following command:
sudo mount -t cifs //XXXX/share /media/share -o user=Ben,password=XXX,workgroup=WORKGROUP,ip=XXX.XX.XX,uid=ben,gid=ben,rw
I don't know why it is not working anymore. (Maybe from system update). I got the following error : mount: only root can mount //XXX.XXX.XXX/share on /home/ben/share I don't know how to fix this problem.. I've also tried to mount it with su -, and Smbclient is working. I'm Running ArchLinux.
Ben D (691 rep)
Mar 1, 2012, 08:00 PM • Last activity: Jun 22, 2025, 08:03 PM
1 votes
1 answers
2946 views
Try to mount SMB share on NAS and get "Operation not supported"
I have several Synology NAS, running DSM 6.2.2-24922 Update 5, which I successfully mount on Ubuntu 18.04 with: sudo mount -t cifs //192.168.x.y/folder_name -o username=user,password=???????,uid=1000,sec=ntlm,vers=1.0 /local_mount_point I have bought a new one, which is running DSM 6.2.4-25556. I at...
I have several Synology NAS, running DSM 6.2.2-24922 Update 5, which I successfully mount on Ubuntu 18.04 with: sudo mount -t cifs //192.168.x.y/folder_name -o username=user,password=???????,uid=1000,sec=ntlm,vers=1.0 /local_mount_point I have bought a new one, which is running DSM 6.2.4-25556. I attempt to mount in the same way and I get this error: mount: /local_mount_point: mount(2) system call failed: Operation not supported. EDIT I removed the vers=1.0, and the error changed to //192.168.x.y/folder_name does not exist Enable SMB Share is enabled on the new NAS, with the same settings as the others. My smb.conf on the new NAS is: [global] printcap name=cups winbind enum groups=yes include=/var/tmp/nginx/smb.netbios.aliases.conf min protocol=SMB2 security=user local master=no realm=* passdb backend=smbpasswd printing=cups max protocol=SMB3 winbind enum users=yes load printers=yes workgroup=WORKGROUP And my smb.share.conf is: [folder_name] recycle bin admin only=yes ftp disable modify=no ftp disable download=no write list=nobody,nobody browseable=yes mediaindex=no hide unreadable=no win share=yes enable recycle bin=yes invalid users=nobody,nobody read list=nobody,nobody ftp disable list=no edit synoacl=yes valid users=nobody,nobody writeable=yes guest ok=yes path=/volume2/folder_name_1 skip smb perm=yes comment="" [folder_name_2] recycle bin admin only=yes ftp disable modify=no ftp disable download=no write list=nobody,nobody browseable=yes mediaindex=no hide unreadable=no win share=yes enable recycle bin=yes invalid users=nobody,nobody read list=nobody,nobody ftp disable list=no edit synoacl=yes valid users=nobody,nobody writeable=yes guest ok=yes path=/volume1/folder_name_2 skip smb perm=yes comment="" (For interest, the smb.conf on one of the NAS which are working is: [global] printcap name=cups winbind enum groups=yes include=/var/tmp/nginx/smb.netbios.aliases.conf security=user local master=no realm=* passdb backend=smbpasswd printing=cups max protocol=SMB2 winbind enum users=yes load printers=yes workgroup=WORKGROUP ) Can anyone advise?
Omroth (153 rep)
Jul 5, 2021, 03:08 PM • Last activity: Jun 18, 2025, 01:02 PM
1 votes
0 answers
748 views
Using server-side copy on a SMB share
According to the [SMB docs][1] server-side copy should work on recent versions of SMB via `cp --reflink` When trying this with a server running smbd 4.15 (via [crazy-max/docker-samba][2]) and a share mounted with `mount -t cifs -o uid=1000,gid=1000,vers=3.1.1 //host/share/ /share`, I always get `Ope...
According to the SMB docs server-side copy should work on recent versions of SMB via cp --reflink When trying this with a server running smbd 4.15 (via crazy-max/docker-samba ) and a share mounted with mount -t cifs -o uid=1000,gid=1000,vers=3.1.1 //host/share/ /share, I always get Operation not supported for cp --reflink /share/test /share/test2. The versions on the client machine are:
~$ mount.cifs --version
mount.cifs version: 6.9
~$ uname -r
5.4.0-125-generic
Why is it not working? Any ideas? Thanks!
frsc (111 rep)
Aug 30, 2022, 02:17 PM • Last activity: Jun 16, 2025, 03:30 PM
0 votes
0 answers
1918 views
Unable to mount a cifs share in Centos, and from Windows clients which are not domain joined
We have a departmental file share and using "mount.cifs" in Centos works to connect to the share. Windows clients either standalone or domain joined can access the share. Fine !! We have a Dell storage device running FluidFS. Only Windows clients which are domain joined can connect. * Non domain joi...
We have a departmental file share and using "mount.cifs" in Centos works to connect to the share. Windows clients either standalone or domain joined can access the share. Fine !! We have a Dell storage device running FluidFS. Only Windows clients which are domain joined can connect. * Non domain joined workstations give the
The specified network password is not correct
error. * The Centos machine gives
mount error(13): Permission denied
I have tried all values for the sec option in Centos. Centos extract from /var/log/messages May 19 15:33:25 backup kernel: No dialect specified on mount. Default has changed to a more secure dialect, SMB2.1 or later (e.g. SMB3), from CIFS (SMB1). To use the less secure SMB1 dialect to access old servers which do not support SMB3 (or SMB2.1) specify vers=1.0 on mount. May 19 15:33:25 backup kernel: Status code returned 0xc000006d STATUS_LOGON_FAILURE May 19 15:33:25 backup kernel: CIFS VFS: Send error in SessSetup = -13 I don't understand what's going on. Any advice is welcome. George
George Thompson (11 rep)
May 19, 2020, 02:43 PM • Last activity: Jun 14, 2025, 08:01 PM
1 votes
1 answers
2228 views
/etc/mtab is bad when mounting a cifs share
On a Linux system, I used the following command to mount a Windows Share folder: mount.cifs -o user=xxxx,pass=xxxx '//host/folder' /mnt Above command finished without giving any errors or output at all. I could see files in /mnt, which means the mount was successful. Then I ran command `mount`, and...
On a Linux system, I used the following command to mount a Windows Share folder: mount.cifs -o user=xxxx,pass=xxxx '//host/folder' /mnt Above command finished without giving any errors or output at all. I could see files in /mnt, which means the mount was successful. Then I ran command mount, and the 1st line of the output says: And the share folder I just mounted doesn't appear in the output. Then I checked the content of /etc/mtab and found that there are a whole lot of options for the just mounted share. like this: enter image description here While on another Linux Machine running the same OS(SLE 11SP3), I did the exact same thing(but using a different share on a different Windows machine), but the content in /etc/mtab is very simple, like this(and mount shows the mounted share correctly and doesn't say mtab is bad): //server/folder /mnt cifs rw 0 0 So the question is, on the 1st machine: 1. why are there so many option for this windows share in /etc/mtab? 2. why does the mount command say "mtab is bad"?
SparedWhisle (3924 rep)
Apr 27, 2016, 06:51 AM • Last activity: Jun 3, 2025, 05:02 AM
0 votes
1 answers
2135 views
CIFS mount incorrect disk space
I defined a new samba mount in an ubuntu VM via `/etc/fstab` ``` //x.x.x.x/share /share cifs credentials=/.smbcreds,uid=1000,gid=1000,vers=3.0 0 0 ``` With this I get the following output from `df -h` ``` filesystem Size Used Avail Use% Mounted On //x.x.x.x/share 5.0G 79M 5.0G 2% /share ... ``` This...
I defined a new samba mount in an ubuntu VM via /etc/fstab
//x.x.x.x/share  /share  cifs  credentials=/.smbcreds,uid=1000,gid=1000,vers=3.0  0  0
With this I get the following output from df -h
filesystem       Size   Used  Avail  Use%  Mounted On
//x.x.x.x/share  5.0G   79M   5.0G   2%    /share
...
This is a ZFS share on the host and I am using samba to expose it here. I would expect to see about 12TB of free space, which is what I see if I run df -u on the samba host. Running du -f --max-depth=1 in the ubuntu VM reports this:
2.2T   /share
...
Which is the correct usage for the mount. Ultimately I am having issues where services are trying to write files to the mount that are larger than the total reported filesystem space and they fail since they do a check on available space before writing.
Michael (1 rep)
Apr 20, 2020, 10:31 AM • Last activity: May 18, 2025, 03:03 AM
0 votes
0 answers
66 views
systemd fails to mount CIFS share at boot with _netdev option: "mount error(101): Network is unreachable"
I'm trying to automatically mount a CIFS network share at `/mnt/Share` using systemd on boot, with the _netdev option in `/etc/fstab`. However, the mount fails with the following error in `journalctl`: May 11 13:11:52 laptop-jonte systemd[1]: Mounting /mnt/Share... May 11 13:11:52 laptop-jonte mount...
I'm trying to automatically mount a CIFS network share at /mnt/Share using systemd on boot, with the _netdev option in /etc/fstab. However, the mount fails with the following error in journalctl: May 11 13:11:52 laptop-jonte systemd: Mounting /mnt/Share... May 11 13:11:52 laptop-jonte mount: mount error(101): Network is unreachable May 11 13:11:52 laptop-jonte mount: Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg) May 11 13:11:52 laptop-jonte systemd: mnt-Share.mount: Mount process exited, code=exited, status=32/n/a May 11 13:11:52 laptop-jonte systemd: mnt-Share.mount: Failed with result 'exit-code'. May 11 13:11:52 laptop-jonte systemd: Failed to mount /mnt/Share. It seems like the network isn't up yet when the mount is attempted. The share mounts fine manually after boot. My /etc/fstab looks like the following: //192.168.178.33/share /mnt/Share cifs credentials=/etc/smbcredentials/.smbcredentials,uid=1000,gid=1000,iocharset=utf8,auto,_netdev,vers=3.0 0 0 Note that x-systemd.automount is not an option for me, as it causes the share to mount at boot, but with root ownership instead of the intended user. So the question is simple: **How can I mount a smb share at boot with user permissions consistently?**
NLion74 (1 rep)
May 11, 2025, 11:23 AM
1 votes
0 answers
1786 views
How to fix VFS: cifs_mount failed w/return code = -115 after an update
This was quite a catastrophic update. Initially, all I got after reboot was a brief error that turned into kernel panic after a few seconds. I booted into the previous kernel but it would not start X. I realized that there was no initramfs for the new kernel and ran `dracut -f -v` to rebuild all of...
This was quite a catastrophic update. Initially, all I got after reboot was a brief error that turned into kernel panic after a few seconds. I booted into the previous kernel but it would not start X. I realized that there was no initramfs for the new kernel and ran dracut -f -v to rebuild all of them. It rebuilt old images but not the new one. I realized that Nvidia kernel module was failing it and uninstalled Nvidia drivers, ran depmod and built initramfs for the new kernel. When I wanted to reinstall Nvidia driver, the drive where I keep it was not mounting from the text console. I had to bring the driver over on an external drive. Then I got X but there is still a problem with CIFS: my Windows shares no longer mount during the system boot. After a few seconds, they throw error -115 (no matter how many times I try). They mount only manually, after X starts, and instantaneously. $ sudo dmesg|grep CIFS|less [ 17.445268] CIFS: enabling forceuid mount option implicitly because uid= option is specified [ 17.445273] CIFS: enabling forcegid mount option implicitly because gid= option is specified [ 17.445275] CIFS: Attempting to mount //server/share [ 27.817807] CIFS: VFS: Error connecting to socket. Aborting operation. [ 27.817822] CIFS: VFS: cifs_mount failed w/return code = -115 [ 121.033569] CIFS: enabling forceuid mount option implicitly because uid= option is specified [ 121.033574] CIFS: enabling forcegid mount option implicitly because gid= option is specified [ 121.033576] CIFS: Attempting to mount //server/share The first attempt is the auto-mounting during the boot, and the second is my manual mounting. The line in fstab that has worked for more than a decade (with a couple of vers updates) is: //server/share /mnt/shared cifs credentials=/etc/smbcredentials,iocharset=utf8,fsc,uid=use0,gid=use0,file_mode=0644,dir_mode=0777,vers=3.11 0 0 Tried smb3 in place of cifs. Makes no difference. My first thought was that something changed in 6.14.5 from the perspective of CIFS syntax, but then I booted into older kernels and found that all of them have the same error now, so this is rather a library/tool issue then kernel, and this might be relevant: Upgrade libsmbclient-2:4.21.5-1.fc41.x86_64 Dependency updates Replaced libsmbclient-2:4.21.4-1.fc41.x86_64 Dependency @System How can the CIFS error be fixed?
SuperAl (151 rep)
May 8, 2025, 10:30 PM • Last activity: May 8, 2025, 10:43 PM
0 votes
1 answers
2300 views
mount with cifs: parameter to replace uid and gid by their names instead
About Samba in Ubuntu, if in the server exists an user created for example with the `omicron` name with `uid=1003 gid=1003` and executed: * `sudo smbpasswd -a omicron` Then, if in the client is tried (multiple lines for presentation purposes): sudo mount -t cifs //192.168.1.X/thenumbers /mnt/192.168...
About Samba in Ubuntu, if in the server exists an user created for example with the omicron name with uid=1003 gid=1003 and executed: * sudo smbpasswd -a omicron Then, if in the client is tried (multiple lines for presentation purposes): sudo mount -t cifs //192.168.1.X/thenumbers /mnt/192.168.1.X/numbers -o username=omicron,rw I am able to mount the expected remote directory into the client, but is **not** possible write something, for example mkdir 777 - it appears _mkdir: cannot create directory '777': Permission denied_. According with man mount.cifs indicates: * rw mount read-write. **Question 1** Why the rw parameter didn't work as expected? If the directory is unmounted and again if in the client is tried (multiple lines for presentation purposes): sudo mount -t cifs //192.168.1.X/thenumbers /mnt/192.168.1.X/numbers -o username=omicron,uid=####,gid=#### Where: * rw does not appear anymore * uid **must** be the same than the server side, in this scenario omicron's uid 1003 * gid is optional, but should be the same than the server side, in this scenario omicron's gid 1003 I am able to mount the expected remote directory into the client and finally is possible write something, for example mkdir 777 **Question 2** Why did uid worked over rw? **Question 3** Is there some parameter to avoid use uid and use the user's name instead? I mean sudo mount -t cifs //192.168.1.X/thenumbers /mnt/192.168.1.X/numbers -o username=omicron,P1=omicron,P2=omicron I read the man mount.cifs but I couldn't find something that represents P1 and P2 to be replaced and applied in the command shown above.
Manuel Jordan (2108 rep)
Nov 4, 2021, 12:10 AM • Last activity: May 5, 2025, 09:01 PM
0 votes
1 answers
107 views
x-systemd.automount and noauto causes CIFS mount to ignore uid/gid and mount as root
I'm trying to mount a CIFS (Samba) share using /etc/fstab, and I want it to be owned by a specific user (myuser), not root. My current fstab line is: # //server/share /mnt/share cifs credentials=/home/myuser/.smbcred,uid=myuser,gid=myuser,noauto,x-systemd.automount 0 0 However, when I include x-syst...
I'm trying to mount a CIFS (Samba) share using /etc/fstab, and I want it to be owned by a specific user (myuser), not root. My current fstab line is: # //server/share /mnt/share cifs credentials=/home/myuser/.smbcred,uid=myuser,gid=myuser,noauto,x-systemd.automount 0 0 However, when I include x-systemd.automount and noauto, the mount happens as root, and the uid/gid options appear to be ignored. Here's what I see after accessing the mount point: $ ls -lah /mnt/share drwxrwx--- 1 root root 0 ... -rw-rw---- 1 root root ... But if I remove x-systemd.automount and noauto and mount the share mount manually, the ownership is correct: $ ls -lah /mnt/share drwxrwx--- 1 myuser myuser 0 ... -rw-rw---- 1 myuser myuser ... So it seems that using x-systemd.automount causes the mount to be performed by root, ignoring uid and gid. Is this expected behavior? Is there a way to use automounting and still preserve the correct ownership? I'm on the regular 6.14.4-arch1-1 kernel with systemd and cifs-utils.
NLion74 (1 rep)
May 4, 2025, 04:30 PM • Last activity: May 4, 2025, 06:09 PM
0 votes
0 answers
27 views
Can See Samba Shares on Phone, but Cannot Mount
I can ping my phone's server: lobsang@lobsang-Inspiron-3195:~$ ping 192.168.86.26 PING 192.168.86.26 (192.168.86.26) 56(84) bytes of data. 64 bytes from 192.168.86.26: icmp_seq=1 ttl=64 time=305 ms 64 bytes from 192.168.86.26: icmp_seq=2 ttl=64 time=90.4 ms ^C --- 192.168.86.26 ping statistics --- 2...
I can ping my phone's server: lobsang@lobsang-Inspiron-3195:~$ ping 192.168.86.26 PING 192.168.86.26 (192.168.86.26) 56(84) bytes of data. 64 bytes from 192.168.86.26: icmp_seq=1 ttl=64 time=305 ms 64 bytes from 192.168.86.26: icmp_seq=2 ttl=64 time=90.4 ms ^C --- 192.168.86.26 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1002ms rtt min/avg/max/mdev = 90.361/197.514/304.667/107.153 ms I can see the shares: lobsang@lobsang-Inspiron-3195:~$ sudo smbclient -p4445 -L //192.168.86.26 Password for [WORKGROUP\root]: Sharename Type Comment --------- ---- ------- MainStorage Disk MemoryCard Disk SMB1 disabled -- no workgroup available There are permissions: lobsang@lobsang-Inspiron-3195:~$ ls -al -R /media /media: total 16 drwxr-xr-x 4 root root 4096 Apr 27 13:20 . drwxr-xr-x 23 root root 4096 Apr 27 15:03 .. drwxrwx---+ 3 root root 4096 Apr 27 13:20 lobsang drwxr-x---+ 2 root root 4096 Mar 26 08:39 root /media/lobsang: total 12 drwxrwx---+ 3 root root 4096 Apr 27 13:20 . drwxr-xr-x 4 root root 4096 Apr 27 13:20 .. drwxrwxrwx 5 lobsang root 4096 Apr 27 14:37 lobsang-samsung /media/lobsang/lobsang-samsung: total 20 drwxrwxrwx 5 lobsang root 4096 Apr 27 14:37 . drwxrwx---+ 3 root root 4096 Apr 27 13:20 .. drwxrwxrwx 2 lobsang root 4096 Apr 27 13:20 MemoryCard (I know 777 is not preferable, will change when I get connection.) But when I try to mount: lobsang@lobsang-Inspiron-3195:~$ sudo mount -t cifs -v -o port=4445,user=admin //192.168.86.26/MemoryCard /media/lobsang/lobsang-samsung/MemoryCard/ Password for admin@//192.168.86.26/MemoryCard: mount.cifs kernel mount options: ip=192.168.86.26,unc=\\192.168.86.26\MemoryCard,port=4445,user=admin,pass=******** I get: mount error(2): No such file or directory Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg) Any ideas?
Lobsang Jamyang (1 rep)
Apr 27, 2025, 07:17 PM
3 votes
1 answers
2993 views
How do I speed up recovering "stuck" cifs mount?
I have a cifs mounted like this: mount.cifs -o uid=myuser,user=...,dom=... //IP/Share /some/mountpoint/ When I try to access it after period of inactivity (or when the network is inaccessible), it stucks application that for prolonged time (minutes). In the end it completes the request and unblocks...
I have a cifs mounted like this: mount.cifs -o uid=myuser,user=...,dom=... //IP/Share /some/mountpoint/ When I try to access it after period of inactivity (or when the network is inaccessible), it stucks application that for prolonged time (minutes). In the end it completes the request and unblocks the application. smbclient can easily log in and view directories, but the /some/mountpoint is waiting and waiting for minutes. How do I speedup these retries?
Vi. (5985 rep)
Jan 15, 2015, 01:38 PM • Last activity: Apr 17, 2025, 01:04 AM
0 votes
1 answers
3832 views
Mounting a share in fstab (Debian 11) fails with BAD_NETWORK_NAME
I can run `sudo mount -t cifs -o guest,user=root //SERVER_NAME/SHARE /mnt/FOLDER` without issue. However, I cannot run `mount -a` or `mount /mnt/folder` when I have this line in fstab: //SERVER_NAME/SHARE /mnt/FOLDER cifs guest,user=root 0 0 This seems to resemble this error: https://bugs.launchpad....
I can run sudo mount -t cifs -o guest,user=root //SERVER_NAME/SHARE /mnt/FOLDER without issue. However, I cannot run mount -a or mount /mnt/folder when I have this line in fstab: //SERVER_NAME/SHARE /mnt/FOLDER cifs guest,user=root 0 0 This seems to resemble this error: https://bugs.launchpad.net/ubuntu/+source/cifs-utils/+bug/1896699
Hifihedgehog (101 rep)
Feb 28, 2022, 12:49 PM • Last activity: Apr 16, 2025, 08:02 PM
1 votes
1 answers
4844 views
Cifs mounting subdirectories from linux
I am trying to mount two subdirectories from the same share name but cannot get it to work. # Mount the two different subfolders: # $server and $share are the same - the subfolder differs: $ subfolderA=a/b/c $ subfolderB=x/y/z $ mount -t cifs //$server/$share/$subfolderA /mnt/dirA $ mount -t cifs //...
I am trying to mount two subdirectories from the same share name but cannot get it to work. # Mount the two different subfolders: # $server and $share are the same - the subfolder differs: $ subfolderA=a/b/c $ subfolderB=x/y/z $ mount -t cifs //$server/$share/$subfolderA /mnt/dirA $ mount -t cifs //$server/$share/$subfolderB /mnt/dirB # Traverse the directories - I see the same file in both directories (should only be be in dirA) $ find /mnt/dir[AB] -name fda.txt -ls 707409139 1024 -rwxr-xr-x 1 root root 15 May 28 08:50 /mnt/dirA/fda.txt 707409139 1024 -rwxr-xr-x 1 root root 15 May 28 08:50 /mnt/dirB/fda.txt # Mount in opposite order: $ umount /mnt/dirA $ umount /mnt/dirB $ mount -t cifs //$server/$share/$subfolderB /mnt/dirB $ mount -t cifs //$server/$share/$subfolderA /mnt/dirA # Traverse the directories - I do not see the file fda.txt at all $ find /mnt/dir[AB] -name fda.txt -ls I have verified my access to the different subfolders using smbclient and it gives me the expected results. The reason for having two separate mounts instead of just one, is because I do not have access to the share itself, but only to the subfolders.
S.Olesen (11 rep)
Aug 15, 2018, 06:06 AM • Last activity: Apr 13, 2025, 03:06 PM
Showing page 1 of 20 total questions