0

Linux noob here. Basically, I want to create several users with full access only to their own home directories.

Here my current /etc/samba/smb.conf config:

#=============== Global definition ===============

[global]
   workgroup = WORKGROUP
   server string = Samba Server %v
   netbios name = ubuntu
   security = user
   map to guest = bad user
   name resolve order = bcast host
   dns proxy = no

#=============== Share Definitions ===============

[homes]
   comment = Home Directories
   browseable = yes
   read only = no
   create mask = 0700
   directory mask = 0700
   valid users = %S

I create new users in the shell with adduser bob

Also, I create users in samba with smbpasswd -a bob

I create them with same password, but still windows says, \\192.168.1.2\bob is not accessible. You might not have permission... and so on.

I tried to work with several tutorials, but still cannot fix the problem.


From windows, nbtstat -A 192.168.1.2

NetBIOS Remote Machine Name Table

   Name               Type         Status
---------------------------------------------
UBUNTU         <00>  UNIQUE      Registered
UBUNTU         <03>  UNIQUE      Registered
UBUNTU         <20>  UNIQUE      Registered
☺☻__MSBROWSE__☻<01>  GROUP       Registered
WORKGROUP      <00>  GROUP       Registered
WORKGROUP      <1D>  UNIQUE      Registered
WORKGROUP      <1E>  GROUP       Registered

This is from debian, nmblookup -A 192.168.1.2

Looking up status of 192.168.1.2
        UBUNTU          <00> -         B <ACTIVE>
        UBUNTU          <03> -         B <ACTIVE>
        UBUNTU          <20> -         B <ACTIVE>
        ..__MSBROWSE__. <01> - <GROUP> B <ACTIVE>
        WORKGROUP       <00> - <GROUP> B <ACTIVE>
        WORKGROUP       <1d> -         B <ACTIVE>
        WORKGROUP       <1e> - <GROUP> B <ACTIVE>

This command didn't work, smbutil -v status -ae 192.168.1.2


I tried to connect from, Ubuntu (different machine), smb://192.168.1.2/bob/ and it works. smbclient //192.168.1.2/bob -U bob also works.

11
  • Have you restarted the service after changing the configuration and adding the user? If so and you continue to have issues another option is to start over but keep things as simple as possible. Backup your samba config file and recreate one with only the most simple set up to see if things work. Please edit your post to include these details.
    – kemotep
    Commented Sep 6, 2019 at 14:18
  • kemotep - I did restart service after every change. I also tried to do everything from scratch few times. Skeetre - Yes, I can see folders just by entering smb from explorer. When I try to make public folder it works, I cannot make home directories to work.
    – Bakra
    Commented Sep 6, 2019 at 14:42
  • Is your netbios name correct? It says Ubuntu but you tagged this post as an issue on a Debian system.
    – kemotep
    Commented Sep 6, 2019 at 15:05
  • Oh.. no, it is Debian. Is this major issue? samba@samba:~$ nbtscan 192.168.1.2 Doing NBT name scan for addresses from 192.168.1.2 IP address NetBIOS Name Server User MAC address ------------------------------------------------------------------------------ 192.168.1.2 UBUNTU <server> UBUNTU 00:00:00:00:00:00
    – Bakra
    Commented Sep 6, 2019 at 15:22
  • I do not have a samba server in front of me but your actual netbios name needs to the one you use. smbutil -v status -ae [IP ADDRESS] should tell you your netbios name. From Windows you can use nbtstat -A [IP ADDRESS]. The ip address being your samba server of course.
    – kemotep
    Commented Sep 6, 2019 at 15:47

1 Answer 1

1

Have you enabled smb in the firewall?

Have you tried just \192.168.1.2 to see if it lists available shares?

You may or may not need to set the SMB version. Windows 10 disabled SMB v1 for security reasons and I've had problems with linux accessing windows shares, but Windows should be able to access the Linux share. You might have to set the smb version in the smb.conf file like this:

[GLOBAL]

client min protocol = SMB2

client max protocol = SMB3

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .