Score:0

Active directory users based on numeric values not able to login

in flag

Active directory based on numeric(01012578) not able to login but wit the same DC we are able to login using name username Eg. syed client o.s 20.0.4 desktop version AD script #!/bin/sh

#Linux Ingration with Active Directory Script #Author: Syed

#Install all required Components echo Installation all Required Components

sudo apt install -y krb5-config sudo apt install -y msktutil sudo apt install -y samba sudo apt-get install -y realmd sssd sssd-tools libpam-sss libnss-sss sudo apt-get install -y krb5-user adcli packagekit sudo apt-get install ntpdate

read -p "Enter your Domain name : " DomainName echo using $DomainName

sudo ntpdate -q $DomainName sudo ntpdate $DomainName

REALMD="/etc/realmd.conf"

/bin/cat <$REALMD

automatic-install = no

EOM

sed -i '28isession optional pam_mkhomedir.so skel = /etc/skel/ mask=0077' /etc/pam.d/common-session

sudo realm discover $DomainName

sudo realm join $DomainName -U administrator --verbose

sudo realm list

sudo realm permit--all

sudo realm permit -g AD_group

sudo mv /etc/krb5.conf /etc/krb5.conf.default

read -p "Enter your Domain System name : " SystemName

KRB5FILE="/etc/krb5.conf"

/bin/cat <$KRB5FILE [libdefaults] default_realm = $DomainName rdns = no dns_lookup_kdc = true dns_lookup_realm = true

[realms] $DomainName = { kdc = $SystemName.$DomainName admin_server = $SystemName.$DomainName }

EOM

kinit syed

klist

read -p "Enter your Local Host name : " HostName

msktutil -N -c -b 'CN=COMPUTERS' -s $HostName/$HostName.$DomainName -k my-keytab.keytab --computer-name $HostName --upn $HostName$ --server $SystemName.$DomainName --user-creds-only

sudo mv my-keytab.keytab /etc/sssd/my-keytab.keytab

sudo mv /etc/sssd/sssd.conf /etc/sssd/sssd.conf.default

SSSDFILE="/etc/sssd/sssd.conf" /bin/cat <$SSSDFILE

[sssd] services = nss, pam config_file_version = 2 domains = $DomainName

[nss] entry_negative_timeout = 0 #debug_level = 5

[pam] #debug_level = 5

[domain/$DomainName] #debug_level = 10 enumerate = false id_provider = ad auth_provider = ad chpass_provider = ad access_provider = ad dyndns_update = false ad_hostname = $HostName.$DomainName ad_server = $SystemName.$DomainName ad_domain = $DomainName ldap_schema = ad ldap_id_mapping = true fallback_homedir = /home/%u default_shell = /bin/bash ldap_sasl_mech = gssapi ldap_sasl_authid = $HostName$ krb5_keytab = /etc/sssd/my-keytab.keytab ldap_krb5_init_creds = true

EOM

sudo chmod 0600 /etc/sssd/sssd.conf

sudo nano /etc/pam.d/common-session

sudo systemctl restart sssd

David avatar
cn flag
If I read your question correctly AD is not allowing the use of numbers but does work with names for login?
user575945 avatar
in flag
sorry for the delay in respond Yes it works with Name Eg syed
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.