Score:0

Samba server stopped working after changed hd [solved]

mx flag

I've had a samba server working along with 7 PC-s, 4 windows 10 and 3 ubuntu without a problem (7 different users, 7 different folders - of which one had multiples valid users.

Someday, my hd stopped working. I've bought a new one and backed all up that I've had in the old one.

I didn't changed anything, mounted the hd at the same location, same name and tested. At my computer (my user in Windows 10 has the same name as in the ubuntu server), everything worked normally but at all the others, nothing worked anymore. They all returned the 0x80070035 error or popped the error that the user can't have access and must contact the server admin (Don't know exactly what it says in english, I'm translating freely).

Things I tested without success:

  1. Changed the passwords;
  2. Changed the users and passwords;
  3. Changed the permissions at ubuntu, 777, 755, 700, nothing worked
  4. Tried accessing with another username at my computer (didn't work)
  5. Tried accessing with my user at the others computer (only at the ubuntu ones worked)
  6. Stopped using valid users at smb.conf and changed to hosts allow = ip from the machines (they're fixed) -> at my PC works as well, but nothing at the other ones
  7. In the others PCs when trying to access the forbidden folders says that access is denied, but at the allowed ones, keeps poping the network error saying that you don't have access, get in touch with the server admin.

I've already tried some solutions to the 0x80070035 error, but nothing worked... that made me wonders if it was something related to windows or is something related to Ubuntu or samba?

I'm out of ideas now, any toughts?

Edit: Ubuntu Destktop version 18.04.6 LTS Samba 4.7.6

/etc/fstab:

# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda1 during installation
UUID=b0bcc319-3efa-425f-8eb2-3c2814ba7ec3 /               ext4    
errors=remount-ro 0       1
/swapfile                                 none            swap    sw              
0       0
UUID=E6B41C9FB41C7471 /media/francisco/Arquivos ntfs defaults,noatime 0 0

Edit2:

The folder /media/francisco/Arquivos has the right permissions, but /media/francisco hasn't, changing it solved immediately

commands used: ls -l to check the permissions and chmod 777 /media/francisco

Marc Vanhoomissen avatar
in flag
Could you check that the names are excatly the same than before? For Ubunut, `MyDir`, `Mydir` and `mydir`are different things.
mx flag
added the /etc/fstab contents and the ubuntu and samba versions; the names are exactly the sames before and after
mx flag
I used blkid and got the UUID, then added it in /etc/fstab mounting at /media/francisco/Arquivos I can access the folder at the server or at my pc as soon as it starts
mx flag
I found out that /media/francisco was only available to root, I've changed to 775 and now is working. Thank's for all your help.
ar flag
Could you please write your answer to the question? After the waiting time you should accept your answer as correct. This will help others.
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.