I want to share files among 2 devices. Let's say Computer A (running Ubuntu 20.04) and Computer B (running Kubuntu 20.04) connected to the same wireless network. I want A to access the public folder of B and vice versa. After installing samba and configuring share properties and allowing guest access, I can access the public folders of a machine with another machine flawlessly, but anonymously. Quite happy with that.

Now I have 2 problems:

1. Changing permissions for enclosed files

When I want to put a folder containing files or sub-folders from B to the public folder of A, then I get an error about the lack of permission. Then I tried to change the permission of the folder of A by right click Properties > Permissions > Change permissions for enclosed files

Public Properties dialog

Can't edit the permissions from here even using nautilus as root user.

2. Accessing the public folders as a registered user

I want to set public folders so the only can be accessed using username and password, instead of guest access. I tried sudo smbpasswd -a <USER_NAME>, however it returned an error of failure to add entry. Then after digging in Internet I found out that <USER_NAME> must be a system user.

The thing is that I believe samba v4 doesn't need a system user. I have v4.11.6. So how do I add a samba user only?


OK, how far do you want me to go into showing you how to set up a Samba AD DC ? ;-)

You are probably running Samba as a standalone server, with 'map to guest = bad user' in [global] and 'guest ok = yes' set in the share (note: 'public' is a synonym for 'guest ok'), so without Samba users, all your users become the 'guest' user (usually 'nobody').

If you want Samba users on a standalone server, then there must be a corresponding Linux user, sorry, but that is just the way it is.

| improve this answer | |
  • Actually your answer sounds jargon to me. Can you elaborate? M new to Linux thingy. – Sabyasachi Rout Jun 17 at 10:06
  • It's more structured in Linux since you need to add a preexisting local server user to the samba password database ( smbpasswd -a ) but the concept is identical to Windows. In order to access a Windows share as "bob" "bob" must exist on the Windows machine. BTW, you don't have to create a new user. You can add yourself via smbpasswd - just give yourself a samba password that is different from your local logon password if the client user is not you. – Morbius1 Jun 17 at 11:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.