Score:0

Samba share folder cant access on windows: ask your administrator for permission

sx flag

I have created a shared folder in Ubuntu and made 2 users i gave all the permissions in smb.cfg . My windows machine can find the shared folder when i double click it it asks for credentials and on the bottom left it says access denied. i use my credentials and the a pop up message says that i have to ask my network administrator for permission. also i open 445 port on windows firewall and active all inbound and outbound that are smb related please advise.

The incomplete output of testparm is this:

[Personal] 
comment = "My Samba File Server" 
path = /share_folder 
read list = usermarios 
valid users = usermarios usernatali 
write list = usermarios

The usershares are this:

[Personal] 
path=/home/morfeas/Desktop/Personal 
comment= 
usershare_acl=Everyone:F, guest_ok=y 

[windows_share] 
path=/home/morfeas/windows_share 
comment= 
usershare_acl=Everyone:F, guest_ok=y
 
[shared_folder] 
path=/home/morfeas/shared_folder 
comment= 
usershare_acl=Everyone:F, guest_ok=n
Morbius1 avatar
es flag
It sounds like a Linux permissions rather than a Samba issue but you have not provided enough information to answer the question. Please post the output of the following command: `testparm -s` and this one: `net usershare info --long` And did you add the users to the samba password database: `sudo smbpasswd -a some-user-name`
smurfeas avatar
sx flag
[Personal] comment = "My Samba File Server" path = /share_folder read list = usermarios valid users = usermarios usernatali write list = usermarios
smurfeas avatar
sx flag
net usershare info --long [Personal] path=/home/morfeas/Desktop/Personal comment= usershare_acl=Everyone:F, guest_ok=y [windows_share] path=/home/morfeas/windows_share comment= usershare_acl=Everyone:F, guest_ok=y info_fn: file /var/lib/samba/usershares/shared is not a well formed usershare file. info_fn: Error was Path is not a directory. [shared_folder] path=/home/morfeas/shared_folder comment= usershare_acl=Everyone:F, guest_ok=n
smurfeas avatar
sx flag
this are the outputs i have created 2 users
mpboden avatar
do flag
When adding new information to questions asked by other AskUbuntu users, please update the original question instead of adding the info as comments. Now with that said, did you add the users to the Samba Password database as @Morbius1 asked?
Score:0
es flag

The [Personal] share you defined in smb.conf makes little sense to me since usernatali can neither read or write to the share. It's basically a share for usermarios only.

The second problem is that you have 2 [Personal] shares: One in smb.conf and the other is a usershare. They are pointing to two different folders and have dissimilar permissions defined. Choose one or the other or rename one.

The third problem is all of your userhsares ar in your home folder and if you are using Ubuntu 22.04 or later guest access is impossible by default. The path=/home/morfeas/shared_folder share can work but it is by default only accessible to morfeas.

If you are in a hurry I would:

[1] Remove the share in /etc/samba/smb.conf.

[2] Right under the workgroup = WORKGROUP line in smb.conf add this one:

force user = morfeas

THen restart smbd: sudo service smbd restart

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.