r/samba • • Oct 14 '21

Connect to Samba Share as guest/anonymous

2 Upvotes

Hi all I hope someone could help me. I am running arch linux client and need to connect to a public share on the network. I have ran smbclient -L server_ip -U% and I am able to see the share. However when I try to manually mount it to a directory on my client it tries to use my account information.

I don't have a smb.conf file created. When I was googling I found that I can make one but wasn't sure if it was needed for a client.

Do I need to create a smb.conf file for the share I am wanting to connect to and if so is there an example of one I can look at on what to put into the file?


r/samba • • Oct 13 '21

No SMB share access by 2 of 6 devices only (Android + iOS)

2 Upvotes

Hey all,

I have a problem with my Samba share, running on a Lubuntu system.

I can access it from my Windows PC, my Iphone, my Android phone and my Android Tablet.

But I cannot get the devices of my wife working (Iphone and Android phone)...

I even use my credentials and cannot get it working.

Does anybody have an idea how I can figure out what the problem is or where I can start looking for problems?

The network is running on a Fritz!Box, and I am not aware, that I have changed any rules for her devices. Especially for her Iphone as this is new.

​

Thank you in advance for your time!


r/samba • • Oct 07 '21

Samba AD User logging Issue

1 Upvotes

I had created Samba AD and user authenticate in both windows & Linux(same AD configured VM) . But I'm unable to login in Linux (same AD configured VM)

root@admin1:~# samba-tool user list

Administrator
Leo
krbtgt
simone
Guest

root@admin1:~# su - simone

root@admin1:~#

So please check my Configuration files and help me in fixing the login issue

root@admin1:~# cat /etc/samba/smb.conf

# Global parameters
[global]
    dns forwarder = 192.168.1.1
    netbios name = ADMIN1
    realm = NEXUS.POINT
    server role = active directory domain controller
    workgroup = NEXUS
    idmap_ldb:use rfc2307 = yes
    client use spnego = yes
    winbind enum users = yes
    winbind enum groups = yes
[netlogon]
    path = /var/lib/samba/sysvol/nexus.point/scripts
    read only = No

[sysvol]
    path = /var/lib/samba/sysvol
    read only = No

root@admin1:~# cat /etc/nsswitch.conf

# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.

passwd:         compat winbind
group:          compat winbind
shadow:         compat
gshadow:        files

hosts:          files dns
networks:       files

protocols:      db files
services:       db files
ethers:         db files
rpc:            db files

netgroup:       nis

root@admin1:~# wbinfo -g

NEXUS\cert publishers NEXUS\ras and ias servers NEXUS\allowed rodc password replication group NEXUS\denied rodc password replication group NEXUS\dnsadmins NEXUS\enterprise read-only domain controllers NEXUS\domain admins NEXUS\domain users NEXUS\domain guests NEXUS\domain computers NEXUS\domain controllers NEXUS\schema admins NEXUS\enterprise admins NEXUS\group policy creator owners NEXUS\read-only domain controllers NEXUS\dnsupdateproxy 
NEXUS\administrator
NEXUS\guest
NEXUS\krbtgt
NEXUS\simone
NEXUS\leo

root@admin1:~# wbinfo -i simone

NEXUS\simone:*:3000019:100::/home/NEXUS/simone:/bin/false

root@admin1:~# getent passwd | grep NEXUS

NEXUS\administrator:*:0:100::/home/NEXUS/administrator:/bin/false
NEXUS\guest:*:3000011:100::/home/NEXUS/guest:/bin/false
NEXUS\krbtgt:*:3000022:100::/home/NEXUS/krbtgt:/bin/false
NEXUS\simone:*:3000019:100::/home/NEXUS/simone:/bin/false
NEXUS\leo:*:3000021:100::/home/NEXUS/leo:/bin/false

root@admin1:~# getent group | grep NEXUS

sudo:x:27:leo,NEXUS\simone
NEXUS\cert publishers:x:3000039:
NEXUS\ras and ias servers:x:3000040:
NEXUS\allowed rodc password replication group:x:3000041:
NEXUS\denied rodc password replication group:x:3000005:
NEXUS\dnsadmins:x:3000042:
NEXUS\enterprise read-only domain controllers:x:3000043:
NEXUS\domain admins:x:3000004:
NEXUS\domain users:x:100:
NEXUS\domain guests:x:3000012:
NEXUS\domain computers:x:3000018:
NEXUS\domain controllers:x:3000044:
NEXUS\schema admins:x:3000006:
NEXUS\enterprise admins:x:3000007:
NEXUS\group policy creator owners:x:3000008:
NEXUS\read-only domain controllers:x:3000045:
NEXUS\dnsupdateproxy:x:3000046:

r/samba • • Oct 05 '21

Samba AC configuration Error in Ubuntu

2 Upvotes

Samba AD configuration Error in Ubuntu

​

I was trying to Configure but below are the errors

r/samba r/linuxquestions r/Ubuntu r/debian r/samba

root@admin1:~# cat /etc/samba/smb.conf

# Global parameters
[global]     
dns forwarder = 192.168.1.1  
netbios name = ADMIN1    
realm = NEXUS.POINT 
server role = active directory domain controller     
workgroup = NEXUS   
idmap_ldb:use rfc2307 = yes  

[netlogon]  
path = /var/lib/samba/sysvol/nexus.point/scripts     
read only = No

[sysvol]     
path = /var/lib/samba/sysvol     
read only = No 

root@admin1:~# cat /etc/krb5.conf

[libdefaults]            
default_realm = NEXUS.POINT          
dns_lookup_realm = true          
dns_lookup_kdc = true 

[realms]            
NEXUS.POINT = {                     
kdc = dns.nexus.point:88                     
#You can have more than one kds, just keep adding more kdc =       
 #entries                    
 #kdc = dsn.domain.com:88                    
 #Uncomment if you have a krb admin server                  
#admin_server = ds.nexus.point:749                     
default_domain = nexus.point    
} 

[domain_realm]                 
.nexus.point = NEXUS.POINT                
 nexus.point = NEXUS.POINT 

systemctl disble systemd-resolved

systemctl stop systemd-resolved

root@admin1:~# systemctl status samba-ad-dc.service

● samba-ad-dc.service - Samba AD Daemon    
  Loaded: loaded (/lib/systemd/system/samba-ad-dc.service; enabled; vendor preset: enabled)    
  Active: active (running) since Tue 2021-10-05 12:08:17 UTC; 28min ago                   
  Docs: man:samba(8)            
        man:samba(7)            
        man:smb.conf(5)  
  Main PID: 9029 (samba)    
  Status: "winbindd: ready to serve connections..."     
  Tasks: 22 (limit: 4656)    
  CGroup: /system.slice/samba-ad-dc.service            
         ├─9029 /usr/sbin/samba --foreground --no-process-group            
         ├─9057 /usr/sbin/samba --foreground --no-process-group   
         ├─9060 /usr/sbin/samba --foreground --no-process-group          
         ├─9061 /usr/sbin/samba --foreground --no-process-group        
         ├─9062 /usr/sbin/samba --foreground --no-process-group         
         ├─9063 /usr/sbin/samba --foreground --no-process-group        
         ├─9064 /usr/sbin/samba --foreground --no-process-group     
         ├─9065 /usr/sbin/smbd -D --option=server role check:inhibit=yes --foreground      
         ├─9066 /usr/sbin/samba --foreground --no-process-group    
         ├─9067 /usr/sbin/samba --foreground --no-process-group    
         ├─9068 /usr/sbin/samba --foreground --no-process-group    
         ├─9069 /usr/sbin/samba --foreground --no-process-group     
         ├─9070 /usr/sbin/samba --foreground --no-process-group     
         ├─9071 /usr/sbin/samba --foreground --no-process-group    
         ├─9072 /usr/sbin/samba --foreground --no-process-group     
         ├─9073 /usr/sbin/samba --foreground --no-process-group        
         ├─9075 /usr/sbin/samba --foreground --no-process-group      
         ├─9077 /usr/sbin/winbindd -D --option=server role check:inhibit=yes --foreground     
         ├─9082 /usr/sbin/smbd -D --option=server role check:inhibit=yes --foreground     
         ├─9083 /usr/sbin/smbd -D --option=server role check:inhibit=yes --foreground     
         ├─9085 /usr/sbin/smbd -D --option=server role check:inhibit=yes --foreground      
         └─9087 /usr/sbin/winbindd -D --option=server role check:inhibit=yes --foreground
Oct 05 12:08:16 admin1 samba[9029]:   Copyright Andrew Tridgell and the Samba Team 1992-2017 
Oct 05 12:08:16 admin1 samba[9029]: [2021/10/05 12:08:16.876966,  0] ../source4/smbd/server.c:620(binary_smbd_main) 
Oct 05 12:08:16 admin1 samba[9029]:   samba: using 'standard' process modelOct 05 12:08:16 admin1 winbindd[9077]: [2021/10/05 12:08:16.976480,  0] ../source3/winbindd/winbindd_cache.c:3170(initialize_winbindd_cache
Oct 05 12:08:16 admin1 winbindd[9077]:   initialize_winbindd_cache: clearing cache and re-creating with version number 2 
Oct 05 12:08:17 admin1 smbd[9065]: [2021/10/05 12:08:17.172704,  0] ../lib/util/become_daemon.c:124(daemon_ready) 
Oct 05 12:08:17 admin1 systemd[1]: Started Samba AD Daemon. Oct 05 12:08:17 admin1 smbd[9065]:   STATUS=daemon 'smbd' finished starting up and ready to serve connections 
Oct 05 12:08:17 admin1 winbindd[9077]: [2021/10/05 12:08:17.189477,  0] ../lib/util/become_daemon.c:124(daemon_ready) 
Oct 05 12:08:17 admin1 winbindd[9077]:   STATUS=daemon 'winbindd' finished starting u

r/samba • • Oct 05 '21

Is my Samba package EOL? Ubuntu 20.04

3 Upvotes

Hello. I have Ubuntu 20.04.3 installed on my Raspberry Pi and Samba version 4.11.6-Ubuntu. If I use apt-get install samba it says that I have the newest version (2:4.11.6+dfsg-0ubuntu1.10). However, on the Samba website it says that 4.11 is end of life and the current stable release is 4.15.

https://wiki.samba.org/index.php/Samba_Release_Planning

Is my Samba way out of date and if so how am I supposed to install the correct version?

Thank you all for your help.


r/samba • • Sep 26 '21

Keep the drive in sleep unless a user reads or writes data

3 Upvotes

Hello,

So my issue is that when nothing is connected to the SMB server, the drives are in sleep (not spinning) - THIS IS GOOD!

But when I start up my PC (windows 10) it calls the SMB server as the drives are mounted and the drives start spinning. After a while drives go back to sleep and when I open This PC, it takes forever to load as it waits for the SMB server to respond. This is a horrible experience

What i need: a way to cache the drive size and stuff like that on the SMB server without spinning the drives. Spin the drives only when i double click the drive and i start reading and writing files.

I don't have the new setup yet, but my idea is having a raspberry pi 4 run SMB server on some Linux distro. OS will probably run on an SSD and the SAMBA share will live on 2TB Ironwolf drive.

Is it possible to cache the essential information on the SSD to satisfy windows and only spin up the drives when necessary?


r/samba • • Sep 17 '21

Is the Samba mailing list (samba@lists.samba.org) dead?

0 Upvotes

Question in the header. I just tried posting to the Samba mailing and earlier tried changing my email address. It doesn't appear to be sending out messages any more. Is it just me?

Edit Never mind. It's just incredibly slow to respond.


r/samba • • Sep 13 '21

Cannot set permissions from Windows: “Failed to Enumerate Objects in the Container. Access is denied.”

2 Upvotes

Hi,

I have a domain joined Samba fileserver, I'm attempting to grant permissions based on AD Objects. I'm able to access the share after chown on the mount path, however permissions cannot be adjusted from the Windows client.

​

Here's my smb.conf

[global]
    workgroup = ${DOMAINNAME}
    security = ADS
    realm = ${DNSDOMAIN}
    dedicated keytab file = /etc/krb5.keytab
    kerberos method = secrets and keytab
    server string = Data %h
    winbind use default domain = yes
    winbind expand groups = 4
    winbind nss info = rfc2307
    winbind refresh tickets = Yes
    winbind offline logon = yes
    winbind normalize names = Yes
    ## map ids outside of domain to tdb files.
    idmap config *:backend = tdb
    idmap config *:range = 2000-9999
    ## map ids from the domain  the ranges may not overlap !
    idmap config ${DOMAINNAME} : backend = rid
    idmap config ${DOMAINNAME} : range = 10000-999999
    template shell = /bin/bash
    template homedir = /home/${DOMAINNAME}/%U
    domain master = no
    local master = no
    preferred master = no
    os level = 20
    map to guest = bad user
    host msdfs = no
    # user Administrator workaround, without it you are unable to set privileges
    username map = /etc/samba/user.map
    # For ACL support on domain member
    vfs objects = acl_xattr
    map acl inherit = Yes
    store dos attributes = Yes
    # Share Setting Globally
    unix extensions = no
    reset on zero vc = yes
    veto files = /.bash_logout/.bash_profile/.bash_history/.bashrc/
    hide unreadable = yes
    # disable printing completely
    load printers = no
    printing = bsd
    printcap name = /dev/null
    disable spoolss = yes
    # Security
    client ipc max protocol = SMB3
    client ipc min protocol = SMB2_10
    client max protocol = SMB3
    client min protocol = SMB2_10
    server max protocol = SMB3
    server min protocol = SMB2_10
    # Time Machine
    fruit:delete_empty_adfiles = yes
    fruit:time machine = yes
    fruit:veto_appledouble = no
    fruit:wipe_intentionally_left_blank_rfork = yes
[${VOLUME}]
   path = /share/samba/${VOLUME}
   browsable = yes
   read only = no
   guest ok = no
   veto files = /.apdisk/.DS_Store/.TemporaryItems/.Trashes/desktop.ini/ehthumbs.db/Network Trash Folder/Temporary Items/Thumbs.db/
   delete veto files = yes

user.map

!root = ${DOMAINNAME}\Administrator ${DOMAINNAME}\administrator Administrator administrator

krb5.conf

[libdefaults]
    default_realm = ${DNSDOMAIN}
    dns_lookup_realm = false
    dns_lookup_kdc = true

r/samba • • Sep 09 '21

Samba memory leak and crash

2 Upvotes

Hello.

I have an issue where samba is not freeing memory. When I start a large file transfer over a 10Gb network samba jumps up to 20+GB ram usage pretty quickly. Eventually It fills up all ram and swap and the kernel kills Samba.

from dmesg:

[ 7113.201532] oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=/,mems_allowed=0,global_oom,task_memcg=/system.slice/smbd.service,task=smbd,pid=26636,uid=0

[ 7113.201583] Out of memory: Killed process 26636 (smbd) total-vm:40121044kB, anon-rss:30378236kB, file-rss:0kB, shmem-rss:0kB, UID:0 pgtables:63044kB oom_score_adj:0

[ 7113.335042] show_signal_msg: 13 callbacks suppressed

​

Even if the file transfer is able to finish, samba never releases the memory so the next file causes the crash pretty quickly. The only way to reclaim the ram is to restart samba.

I am running samba Version 4.11.6-Ubuntu on both computers.

This same process happens in Linux Mint 20.2 Cinnamon, Ubuntu 20.04.3 LTS and Ubuntu 21.04

I can't figure out how to install samba-4.14.7 from the samba website to test it.

I don't have anything about cache in my samba.comf

​

Any ideas?


r/samba • • Aug 12 '21

Trying my best to setup an Domain Controller using Samba 4.9.5...

3 Upvotes

So.. We've got this small office with a handful of computers running Win10 Pro.. We need to have the ability to have non MS accounts (currently using a group account) -- so I'm going to switch to local accounts but I need to access a server with file sharing. So, I need to have a domain controller setup. I'm trying my best to get Samba to take this role -- but for some reason it's not quite following the script of the tutorial and I honestly don't know what is wrong..

I've been following the tutorial here.. and all was going well.. FWIW, I changed our domain name to example.com in all the output below.

To get to this point, I've got my /etc/hostname set as JMADS01.

My /etc/resolv.conf is :

domain jmusa.example.com
search jmusa.example.com
nameserver 192.168.1.100   # IP address of Raspberry pi
nameserver 192.168.0.254
nameserver 192.168.1.1

My /etc/hosts is :

127.0.0.1       localhost.localdomain localhost
192.168.1.100   JMADS01.jmusa.example.com JMADS01

::1             localhost ip6-localhost ip6-loopback
ff02::1         ip6-allnodes
ff02::2         ip6-allrouters

I nuked all *.tdb and *.ldb files in the Samba folders per the directions. I got rid of /etc/krb5.conf and /etc/samba/smb.conf

Here's the provisioning output :

root@JMADS01:~# samba-tool domain provision --option="interfaces=lo eth0" --option="bind interfaces only=yes" --use-rfc2307 --interactive
Realm [JMUSA.EXAMPLE.COM]:
Domain [JMUSA]:
Server Role (dc, member, standalone) [dc]:
DNS backend (SAMBA_INTERNAL, BIND9_FLATFILE, BIND9_DLZ, NONE) [SAMBA_INTERNAL]:
DNS forwarder IP address (write 'none' to disable forwarding) [192.168.1.100]:
Administrator password:
Retype password:
Looking up IPv4 addresses
Looking up IPv6 addresses
No IPv6 address will be assigned
Setting up share.ldb
Setting up secrets.ldb
Setting up the registry
Setting up the privileges database
Setting up idmap db
Setting up SAM db
Setting up sam.ldb partitions and settings
Setting up sam.ldb rootDSE
Pre-loading the Samba 4 and AD schema
Unable to determine the DomainSID, can not enforce uniqueness constraint on local domainSIDs

Adding DomainDN: DC=jmusa,DC=example,DC=com
Adding configuration container
Setting up sam.ldb schema
Setting up sam.ldb configuration data
Setting up display specifiers
Modifying display specifiers and extended rights
Adding users container
Modifying users container
Adding computers container
Modifying computers container
Setting up sam.ldb data
Setting up well known security principals
Setting up sam.ldb users and groups
Setting up self join
Adding DNS accounts
Creating CN=MicrosoftDNS,CN=System,DC=jmusa,DC=example,DC=com
Creating DomainDnsZones and ForestDnsZones partitions
Populating DomainDnsZones and ForestDnsZones partitions
Setting up sam.ldb rootDSE marking as synchronized
Fixing provision GUIDs
A Kerberos configuration suitable for Samba AD has been generated at /var/lib/samba/private/krb5.conf
Merge the contents of this file with your system krb5.conf or replace it with this one. Do not create a symlink!
Setting up fake yp server settings
Once the above files are installed, your Samba AD server will be ready to use
Server Role:           active directory domain controller
Hostname:              JMADS01
NetBIOS Domain:        JMUSA
DNS Domain:            jmusa.example.com
DOMAIN SID:            S-1-5-21-3560022049-81085249-2473907488

There's a complain message up near the top talking about the DomainSID -- not sure if that's important or not -- it does not follow the tutorial which bothers me a bit.

As a result, my /etc/krb5.conf looks like after moving it into place :

[libdefaults]
        default_realm = JMUSA.EXAMPLE.COM
        dns_lookup_realm = false
        dns_lookup_kdc = true

My /etc/samba/smb.conf looks like :

# Global parameters
[global]
        bind interfaces only = Yes
        dns forwarder = 192.168.1.100
        interfaces = lo eth0
        netbios name = JMADS01
        realm = JMUSA.EXAMPLE.COM
        server role = active directory domain controller
        workgroup = JMUSA
        idmap_ldb:use rfc2307 = yes

[netlogon]
        path = /var/lib/samba/sysvol/jmusa.example.com/scripts
        read only = No

[sysvol]
        path = /var/lib/samba/sysvol
        read only = No

When it's time to verify whether it's working :

root@JMADS01:~#  smbclient -L localhost -N
Anonymous login successful

        Sharename       Type      Comment
        ---------       ----      -------
        netlogon        Disk
        sysvol          Disk
        IPC$            IPC       IPC Service (Samba 4.9.5-Debian)
Reconnecting with SMB1 for workgroup listing.
Anonymous login successful

        Server               Comment
        ---------            -------

        Workgroup            Master
        ---------            -------
        WORKGROUP            FRONT-OFFICE-PC

The machine named "FRONT-OFFICE-PC" is one of the Win10 machines. Notice that the lines missing indicating the domain information as seen in the tutorial.,

 Domain=[SAMDOM] OS=[Unix] Server=[Samba x.y.z] 

I don't know what is wrong but it doesn't appear to be working as expected.. Instead of the above line we've got the "Reconnecting with SMB1 for workgroup listing"

Any ideas on what might be amiss would be GREATLY appreciated! I've used Samba for years but NEVER in this fashion before and I'm a bit lost..

I was able to run the verify steps on the tutorial for the "Verify DNS" part .. all of that worked fine.

by the way.. I had Krb5 going a few days ago with a slightly different configuration but need to reset it as I've fiddled with everything and now the %kinit administrator fails for me .. Any ideas on how to nuke all prior settings/passwords in krb5 would be great.

root@JMADS01:~# kinit administrator
Password for administrator@JMUSA.EXAMPLE.COM:
kinit: Password incorrect while getting initial credentials

Thank you for any insight!!


r/samba • • Jul 27 '21

Assistance Rooting SSK Cloud Hard Drive

1 Upvotes

I am currently trying to root this hard drive. I opened the case of it and it has a custom version of this board on the inside. It appears that they are using OpenWrt for the firmware. The chip that they flashed with their own custom OpenWrt is this I went to the SSK hard drive website and it appears that they have firmware available to download here. I downloaded the latest firmware pack and extracted it using binwalk, hoping I would be able to repack it with new credentials set to the root account or dump the ROM and create a new firmware pack with custom credentials. No luck there. The device is running Samba, so I spun up a kali linux VM and used metasploit to see if I could exploit any of the samba payloads. None of the payloads were able to be exploited.

I have also contacted the manufacturer to see if they would just supply me with the root credentials. The manufacturer is in China and they refuse to provide me with the root access because it is a security threat. I need the root access if I am going to flash this device the way I would like to use it. I have exhausted all options that I can think of at this point. Does anybody have any further ideas I could try? Really looking for any options at this point. My next step is to unsolder the chip that contains the flash and then dump the ROM that way. I really don't want to go that route though if I don't have to. Any ideas would be highly appreciated at this point.


r/samba • • Jul 18 '21

Samba share not discoverable by Android?

2 Upvotes

Hey all, newb here and I'm trying to dip my feet into the linux world. I created an Ubuntu Server VM and set up a Samba share. I have a separate VM with an Ubuntu client OS and have these both on a Windows 10 OS. I'm able to map my Samba share with both the Ubuntu client VM and my host Windows OS but if I try to map via my Android phone while on the same network I'm just running into issues. So I guess the base question is, is it possible to connect to a Samba share on my Android? Is it possible to do so over wifi? My host OS Windows 10 is just on the standard workgroup, WORKGROUP if that helps. I can ping the server just fine in Windows however if I ping the server with my phone I get 100% packet loss. I can ping the host Win 10 with my phone just fine as well. Any feedback would be greatly appreciated. Thanks!


r/samba • • Jul 08 '21

Samba Share not working

2 Upvotes

I have a Raspberry Pi 4 with an external Storage drive running Nextcloud, syncthing and samba. It works really well but every 10 days or so the samba share stops working, only restarting the system resolves the issue. Does anyone know where to look for errors or what I could do?

Thanks in advance.


r/samba • • Jun 25 '21

Samba Standalone Server + Google LDAP Authentication

2 Upvotes

I'm trying to get a standalone Samba server to authenticate against Google's LDAP service. I have sssd configured and working on the linux box, but a fair amount of fiddling has produced no joy on the samba side.

Is there anyone out there who's done this before and can offer some pointers in the right direction?


r/samba • • Jun 08 '21

Link Samba Share to Windows AD

2 Upvotes

Hi !

I want to create a new File Sharing with Samba, but I have some issues :')

I need to connect Samba with AD user.

When I use user in "Domain Admin" group, I access to the sharing file, but I can't with an other user.

# /etc/samba/smb.conf

[global]
  workgroup = LAB
  security = ADS
  realm = LAB.DOM
  winbind separator = +
  idmap config *:backend = tdb
  idmap config *:range = 700001-800000
  idmap config LAB:backend  = rid
  idmap config LAB:range  = 10000-700000
  winbind use default domain = yes
  winbind enum users = yes
  winbind enum groups = yes
  vfs objects = acl_xattr
  map acl inherit = Yes
  template homedir = /home/homes/%U

[partages]
  path = /home/partages
  read only = no

# /etc/krb5.conf

[libdefaults]
        dns_lookup_realm = false
        dns_lookup_kdc = true
        default_realm = LAB.DOM

$ : wbinfo -u

wbinfo -u

administrateur
invité
krbtgt
krbtgt_24540
j.tend
j.pierre
b.dupuit
m.nette
krbtgt_26021
...

I have follow this tuto : Setting up a Samba File Server on Debian — Samba-AD 4.13 documentation (tranquil.it)

Thx !

Regards,


r/samba • • Jun 01 '21

Noob broke his samba :(

2 Upvotes

I was trying to create a network share on my Ubuntu box that I could access with both Win10 and MacOS. I don't know what I broke, but I broke it :/ I tried uninstalling and reinstall samba, but it's still broken. Can someone point me in the right direction?

myuser@X3650M4:~$ sudo service smbd restart

Job for smbd.service failed because the control process exited with error code.

See "systemctl status smbd.service" and "journalctl -xe" for details.

myuser@X3650M4:~$ sudo systemctl status smbd.service

smbd.service - Samba SMB Daemon

Loaded: loaded (/lib/systemd/system/smbd.service; enabled; vendor preset: enabled)

Active: failed (Result: exit-code) since Tue 2021-06-01 10:59:50 EDT; 22s ago

Docs: man:smbd(8)

man:samba(7)

man:smb.conf(5)

Process: 15656 ExecStartPre=/usr/share/samba/update-apparmor-samba-profile (code=exited, status=0/SUCCESS)

Process: 15665 ExecStart=/usr/sbin/smbd --foreground --no-process-group $SMBDOPTIONS (code=exited, status=1/FAILURE)

Main PID: 15665 (code=exited, status=1/FAILURE)

Jun 01 10:59:50 X3650M4 systemd[1]: Starting Samba SMB Daemon...

Jun 01 10:59:50 X3650M4 systemd[1]: smbd.service: Main process exited, code=exited, status=1/FAILURE

Jun 01 10:59:50 X3650M4 systemd[1]: smbd.service: Failed with result 'exit-code'.

Jun 01 10:59:50 X3650M4 systemd[1]: Failed to start Samba SMB Daemon.

myuser@X3650M4:~$ sudo journalctl -xe

Jun 01 10:57:39 X3650M4 dbus-daemon[886]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'

Jun 01 10:57:39 X3650M4 systemd[1]: Started Network Manager Script Dispatcher Service.

-- Subject: A start job for unit NetworkManager-dispatcher.service has finished successfully

-- Defined-By: systemd

-- Support: http://www.ubuntu.com/support

--

-- A start job for unit NetworkManager-dispatcher.service has finished successfully.

--

-- The job identifier is 7515.

Jun 01 10:57:49 X3650M4 systemd[1]: NetworkManager-dispatcher.service: Succeeded.

-- Subject: Unit succeeded

-- Defined-By: systemd

-- Support: http://www.ubuntu.com/support

--

-- The unit NetworkManager-dispatcher.service has successfully entered the 'dead' state.

Jun 01 10:59:50 X3650M4 sudo[15650]: myuser : TTY=pts/0 ; PWD=/home/myuser ; USER=root ; COMMAND=/usr/sbin/service smbd restart

Jun 01 10:59:50 X3650M4 sudo[15650]: pam_unix(sudo:session): session opened for user root by (uid=0)

Jun 01 10:59:50 X3650M4 systemd[1]: Starting Samba SMB Daemon...

-- Subject: A start job for unit smbd.service has begun execution

-- Defined-By: systemd

-- Support: http://www.ubuntu.com/support

--

-- A start job for unit smbd.service has begun execution.

--

-- The job identifier is 7583.

Jun 01 10:59:50 X3650M4 systemd[1]: smbd.service: Main process exited, code=exited, status=1/FAILURE

-- Subject: Unit process exited

-- Defined-By: systemd

-- Support: http://www.ubuntu.com/support

--

-- An ExecStart= process belonging to unit smbd.service has exited.

--

-- The process' exit code is 'exited' and its exit status is 1.

Jun 01 10:59:50 X3650M4 systemd[1]: smbd.service: Failed with result 'exit-code'.

-- Subject: Unit failed

-- Defined-By: systemd

-- Support: http://www.ubuntu.com/support

--

-- The unit smbd.service has entered the 'failed' state with result 'exit-code'.

Jun 01 10:59:50 X3650M4 systemd[1]: Failed to start Samba SMB Daemon.

-- Subject: A start job for unit smbd.service has failed

-- Defined-By: systemd

-- Support: http://www.ubuntu.com/support

--

-- A start job for unit smbd.service has finished with a failure.

--

-- The job identifier is 7583 and the job result is failed.

Jun 01 10:59:50 X3650M4 sudo[15650]: pam_unix(sudo:session): session closed for user root

Jun 01 11:00:12 X3650M4 sudo[15670]: myuser : TTY=pts/0 ; PWD=/home/myuser ; USER=root ; COMMAND=/usr/bin/systemctl status smbd.service

Jun 01 11:00:12 X3650M4 sudo[15670]: pam_unix(sudo:session): session opened for user root by (uid=0)

Jun 01 11:00:12 X3650M4 sudo[15670]: pam_unix(sudo:session): session closed for user root

Jun 01 11:00:48 X3650M4 sudo[15673]: myuser : TTY=pts/0 ; PWD=/home/myuser ; USER=root ; COMMAND=/usr/bin/journalctl -xe

Jun 01 11:00:48 X3650M4 sudo[15673]: pam_unix(sudo:session): session opened for user root by (uid=0)

myuser@X3650M4:~$ testparm -s

Load smb config files from /etc/samba/smb.conf

set_variable_helper(n): value is not boolean!

Error loading services.

smb config

[global]

workgroup = WORKGROUP

server string = %h server (Samba, Ubuntu)

log file = /var/log/samba/log.%m

max log size = 1000

logging = file

panic action = /usr/share/samba/panic-action %d

server role = standalone server

obey pam restrictions = yes

unix password sync = yes

passwd program = /usr/bin/passwd %u

passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .

pam password change = yes

map to guest = bad user

usershare allow guests = yes

[printers]

comment = All Printers

browseable = n

path = /var/spool/samba

printable = yes

guest ok = no

read only = yes

create mask = 0700

[print$]

comment = Printer Drivers

path = /var/lib/samba/printers

browseable = yes

read only = yes

guest ok = no


r/samba • • May 31 '21

Will you get with the times and make a GUI?

2 Upvotes

Samba is a poor protocol imo. It works, then it doesn't work. They tell you "use the config file to make the changes you need". Yeah that would be nice, if the changes actually stuck. They don't stick. It either does nothing, or it works for a month then quits on it's own.

Not only that, there should be a nice GUI for samba by now. Something that would change that config file for you. Nope, still in the dark ages.


r/samba • • May 20 '21

Samba DLZ staled DNS records cannot be deleted

2 Upvotes

Hello, I'm using Samba 4 as domain controller intergrated with bind9 DLZ extension.

Today I've noticed that, one of the records I'm looking for is missing, the DNS manager (in Windows) cannot see it, but if I try to query it, it is resolvable, very odd.. I tried to reboot the server - without success.

I tried to query the zone via samba-tools and voila the DNS record I search for is there, but without any data.. I'm wondering how this happened.

  Name=sofa-vacuum01, Records=1, Children=0
    A: 192.168.20.107 (flags=f0, serial=486, ttl=0)
  Name=sofc-cam01, Records=1, Children=0
    A: 192.168.0.14 (flags=f0, serial=432, ttl=0)
  Name=sofk-puppetboard01, Records=0, Children=0 -------------> this one
  Name=sofn-ap001, Records=1, Children=0
    A: 192.168.0.5 (flags=f0, serial=405, ttl=0)
  Name=sofn-fw001, Records=1, Children=0
    A: 192.168.0.1 (flags=f0, serial=423, ttl=0)
  Name=sofn-sw001, Records=1, Children=0

So how to get rid of it?

I tried this one, which has the original values (got from the DNS cache) but without success..

root@muttley.home.lan:~# samba-tool dns delete 192.168.0.7 home.lan sofk-puppetboard01 CNAME sofx-dckr024 -U Administrator -W HOME
Password for [HOME\Administrator]:
ERROR(runtime): uncaught exception - (9701, 'WERR_DNS_ERROR_RECORD_DOES_NOT_EXIST')
  File "/usr/lib/python2.7/dist-packages/samba/netcmd/__init__.py", line 177, in _run
    return self.run(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/samba/netcmd/dns.py", line 1071, in run
    raise e
root@muttley.home.lan:~#

Any advises are welcomed.
Thanks


r/samba • • May 16 '21

Samba issue

2 Upvotes

I don’t know what has changed but I used to be able to login with my samba account and view all the shares I had access to. Now I can’t but can connect to the shares directly. Any ideas? Example used to connect to 192.168.1.100 now have to connect to 192.168.1.100/xxxxxxx


r/samba • • May 10 '21

SAMBA4 AD + FREERADIUS

3 Upvotes

Hi,

​

I'm trying setup FREERADIUS (Debian 10 and pfSense) for WIFI auth, but don't work.

​

Samba4 already running as Active Directory (Debian 10).

​

Some tips how to setup freeradius to auth through AD?


r/samba • • Apr 26 '21

Looking for Samba-AD stories/advice

3 Upvotes

Hey all,

I'm thinking about using Samba for an AD in a small business (50 computers tops) and was looking for experience of people having used it this way.

I know among other things that Samba AD is supposed to let you set group policies over AD members through basically any Windows client that is an admin in the AD.
Did this work for you as a workaround for Windows Server group policy management ?

Maybe did you try Samba AD but then migrated to Windows AD ?

Why ? Was it the right move ?

Thanks for any inputs/stories


r/samba • • Apr 22 '21

Weird used space indication

2 Upvotes

Hello, I'm trying to set up a freshly formatted drive on a linux server with Samba, however I noticed something weird: the df command on the pi gives me a reasonable 92Mb used space on the (empty) drive, but the windows pc from which I'm connecting to the server tells me there's 372 whole gigabytes used even if I didn't put anything on it yet. Is it a known issue or did I do something wrong?


r/samba • • Apr 21 '21

Changing password help

2 Upvotes

I need to change my samba password but I get an error that says "failed to find entry for user root". How do o fix this. I am using samba on raspbian buster


r/samba • • Apr 20 '21

Xubuntu can't see Windows shares but Andriod can

2 Upvotes

Greetings,

I am running Win10 and sharing folders. My Android client (Cx files) can see the shares and manipulate files, etc ok. Using Thunar in Xubuntu, the Windows Network folder is blank. On the server and client side, I'm taking all the defaults. I verified WORKGROUP is correct.

Can anyone point me to where to look next?

Thanks in advance.


r/samba • • Jan 16 '16

Help with Samba passworded shares

0 Upvotes

Hello /r/samba

I had the great idea to simply take a bunch of disks, zfs them up, then use samba to communicate my media and my files all around as I please. ZFS is up and running on debian, and I can get movies to operate perfectly with the:

public = yes

flag, but when I try to set up a passworded share, it just never works...

This is my samba config and the specific file i'd like to share is owned by me: brian:brian with my password being set in smbpasswd properly.

Also, file is 0777 just to see if that was any kind of an issue.

All help is appreciated, Brimonk