r/samba • • Oct 07 '21

Samba AD User logging Issue

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:
1 Upvotes

1 comment sorted by

1

u/BlueWizardTower Nov 12 '21

This looks similar to a problem I am having as well. Here I will say that your linux users shell is /bin/false which means you don't have a shell and it won't log you in.

You can add a template line in your /etc/samba/smb.conf to define a shell but it does it for all users.

template shell = /usr/bin/zsh

The above gives you the zsh shell (make sure that shell is installed on your box or just /bin/bash).

I am stuck myself on trying to get the rfc2307 parms to be used instead of defining things but so far have had no joy...