Hot answers tagged

100 votes
Accepted

"WannaCry" on Linux systems: How do you protect yourself?

This Samba new vulnerability is already being called "Sambacry", while the exploit itself mentions "Eternal Red Samba", announced in twitter (sensationally) as: Samba bug, the metasploit one-liner ...
Rui F Ribeiro's user avatar
66 votes

Changing a file's "Date Created" and "Last Modified" attributes to another file's

Easiest way - accessed modified will be the same: touch -a -m -t 201512180130.09 fileName.ext Where: -a = accessed -m = modified -t = timestamp - use [[CC]YY]MMDDhhmm[.ss] time format If you wish ...
Jadeye's user avatar
  • 897
51 votes

mount -t cifs: "Operation not supported", but can connect via smbclient

At work I encountered a similar problem. moun -t cifs just stopped working. Following mounting a CIFS/SMB resource and looking at the output of demsg, I found that adding the option vers=1.0 did the ...
NWMT's user avatar
  • 631
37 votes

Mounting cifs: "Operation not supported"

To fill out the answers from @Ken and @Paul: The SMB version needs to be specified when higher than v1: mount -t cifs \ -o username=USERNAME,vers=3.0 \ //server/share \ /mnt/point The Linux ...
matt wilkie's user avatar
36 votes

Sending files over Samba with command line

curl supports the smb v1 protocol since v7.40: curl --upload-file /path/to/file.ext -u 'DOMAIN\Username' smb://172.16.17.52/ShareName/ SMB v1 is not available by default in Windows anymore so this ...
eadmaster's user avatar
  • 1,633
27 votes
Accepted

how to use a credential file when mounting a samba share using mount command?

you must use the argument credentials= mount -t cifs //ip/share /mnt/backups -o credentials=/path/filename quoting from man mount.cifs credentials=filename specifies a file that contains a username ...
D'Arcy Nader's user avatar
  • 1,848
25 votes

samba how to display files with colon in their names?

The problem with Samba's mangled names option is that neither setting is ideal. You can have names that are not mangled, but cannot be accessed in any way because they contain illegal characters, or ...
Chris Davies's user avatar
24 votes
Accepted

Getting Samba working in manjoro linux, daemon failed to start: Samba detected misconfigured 'server role' and exited.

It was a misunderstanding on my part. I don't need to start the samba.service. https://www.samba.org/samba/docs/man/manpages-3/ "samba(8) Server to provide AD and SMB/CIFS services to clients" ...
nelaaro's user avatar
  • 1,333
24 votes
Accepted

Error while mounting samba share: CIFS VFS: No username specified

You need to install cifs-utils: yum install cifs-utils # centos/redhat/older fedora dnf install cifs-utils # newer fedora apt install cifs-utils # debian/ubuntu
ndemou's user avatar
  • 2,769
22 votes

How do you make samba follow symlink outside the shared path

Alternatively to the other answers, to keep the unix extensions enabled, it is possible to use: [global] allow insecure wide links = yes [share] follow symlinks = yes wide links = yes
user1182474's user avatar
21 votes

"WannaCry" on Linux systems: How do you protect yourself?

Most of us running Samba servers out there are probably running it inside LANs, behind firewalls and don't expose its ports directly to the outside world. It would an awful practice if you did so, ...
Bojan Markovic's user avatar
16 votes

Shared folder between QEMU Windows guest and Linux host

In 2018 a simple way to share a folder between a Linux host & Windows virtual machine is to enable RDP in the Windows guest & connect to the vm with the Remmina Remote Desktop Client & ...
Stuart Cardall's user avatar
16 votes
Accepted

Rename file with weird name on Samba mount

Summary of relevant comments: Unix file systems allows any character in a file name apart from \0 (nul) and / (forward slash). The fact that ls shows question marks is only because it can't display ...
Kusalananda's user avatar
  • 331k
15 votes

mount error 13 = Permission denied

I ran into this problem and the issue turned out to be not formatting the values in my credentials file correctly. I tried: username=DOMAIN\mylogin password=<password> domain=FULLY.QUALIFIED....
Mark Salisbury's user avatar
15 votes
Accepted

How to check SMB connections and the dialect that is being used on linux?

If you are running a Samba server on Linux, smbstatus should show the protocol version used by each client. If Linux is the client, it depends on which client you're using: if you're using the kernel-...
telcoM's user avatar
  • 94.7k
14 votes
Accepted

Samba: How to prevent Samba-server from auto-providing users /home-directory as a shared-folder?

Per @Nasir Riley's answer - That will keep the share from showing to anyone browsing the server for shares. However, the share is still available if you know that it exists. It would be much better ...
ivanivan's user avatar
  • 4,925
14 votes

Available min max values for SMB protocol

From the man page for the configuration file for the Samba suite in the "client max protocol" section: Possible values are : CORE: Earliest version. No concept of user names. COREPLUS: ...
Jeff Schaller's user avatar
  • 67.1k
13 votes
Accepted

Why do I get ”mount error(1): Operation not permitted“ on ”mount.cifs“ in a LXC container on a Proxmox VE machine?

You're probably running an unprivileged LXC container. The easiest solution is to use a privileged container instead. However, there might be other solutions; take a look e.g. at this thread/post in ...
myrdd's user avatar
  • 479
11 votes
Accepted

How to chown a file on a CIFS mount?

I'm not sure what symlink you are referring to. What you fail to change is the owner of /mnt/docs, the mount-point of your CIFS share. The mount-point owner changed to the user who mounted something ...
xhienne's user avatar
  • 17.8k
10 votes

How to mount a windows/samba windows share under Linux?

I'm using a BeagleBone Black running Debian 4.9 and, due to it's limited storage capacity, I needed to mount a remote folder hosted on a Windows 10 desktop. (I know this is probably not the best from ...
Jim Fell's user avatar
  • 265
10 votes
Accepted

Debian server, auto-mount Samba share

You are hiting a known systemd "feature"; on top of it, the system might be trying to mount the remote SAMBA share before networking is operational. Modify your fstab to to add to the mounting ...
Rui F Ribeiro's user avatar
9 votes

How do you make samba follow symlink outside the shared path

To allow Samba clients to follow symlinks outside of the shared path, all you need in the Samba configuration is : [global] allow insecure wide links = yes unix extensions = no [myShare] wide links =...
Httqm's user avatar
  • 1,136
9 votes
Accepted

Smbclient asking for password

It should be possible to do it. From man smbclient : -U|--user=username[%password] Sets the SMB username or username and password. If %password is not specified, the user will be ...
magor's user avatar
  • 3,742
9 votes

Windows clients will not refresh Linux samba file locally if reading file at intervals <= 10 seconds

The default values for the relevant settings are: oplocks = yes kernel oplocks = no (See Samba smb.conf documentation) You can disable oplocks, as per another answer. Alternatively, if you are ...
Serge's user avatar
  • 221
9 votes

How to check SMB connections and the dialect that is being used on linux?

You can use a script that comes with nmap. nmap/Zenmap(GUI) will allow you to scan a single device or subnet range (your home or office network) and try and show you what SMB protocols are in use. ...
cdplayer's user avatar
  • 191
8 votes

SAMBA Specified Network Name no Longer Available

Sometimes Samba fails to install or update it's dependencies correctly. Inspect /var/log/samba/log.smbd, looking for anything regarding talloc2 errors. Try running the following command to ensure ...
Jongosi's user avatar
  • 203
8 votes
Accepted

Docker container with Samba exits without any message

The container will exit without any comment, unless you increase the debug level. You can use something like --debuglevel=4. Once you do that, rebuilt and restart the container you will should get ...
Anthon's user avatar
  • 79.1k
8 votes

how to access samba share from Windows which is running on different port

This can't be done. Windows does not support TCP ports other than 445/139. Here is one reference.
Rahul's user avatar
  • 13.5k
8 votes

What does browseable in samba configuration mean?

From the man page: browseable This controls whether this share is seen in the list of available shares in a net view and in the browse list. Consider, do you also have "guest ok"? guest ok ...
Centimane's user avatar
  • 4,460
8 votes
Accepted

system-config-samba crash with could not open configuration file `/etc/libuser.conf'

Suffice to create that file: sudo touch /etc/libuser.conf And re-run the samba configurator.
Vlastimil Burián's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible