Researcher007
New Member
We are having an Ubuntu 20.04 LTS (server) machine which has been connected to the Windows AD domain. The machine is able to fetch the list of all users in the AD domain using 'getent passwd' command, and our hosts file is configured as below:
127.0.0.1 localhost
127.0.0.1 OurDomainName
(our Domain controller address) OurDomainName.in
However, the users having a space in their Windows Account usernames (for example, 'Charles B') are not able to login to the Ubuntu machine, even after modifying the NAME_REGEX to allow 'bad usernames'. There is no issue for the users who do not have space in the usernames and they are able to login normally. We are getting an impression that even after adding the Ubuntu machine to a Windows domain, the Linux policy is somehow overriding the Windows domain policy that has no problems with spaces in usernames.
We have tried enclosing the usernames in double quotes("), single quotes, adding escape sequence instead of space but did not work. Also tried using 'DOMAIN\Firstname Lastname' and "DOMAIN\Firstname Lastname" also but did not work.
Is there any way users with space in their Windows usernames can login to an Ubuntu machine joined to a Windows AD domain? We would like to know whether this is a general Linux built-in setting/behaviour.
Our configuration is as below:
Netplan: (DC address) along with Google DNS
AD: Kerberos Authentication enabled.
We have setup auto-home directory creation for new users in Ubuntu machine.
Our LDAP config is as below:
{BASE dc=(our DC name),dc=in
URI ldap=//(DC IP address)}
Windows AD server: we have enabled the setting 'Trust the computer for delegation in any service.
EDIT 23.6.22:
We also tried escaping the spaces like 'DOMAIN\Firstname/ Lastname' and "DOMAIN\Firstname/ Lastname" but did not work.
EDIT 29.6.22:
We have modified our smb.conf to include the following:
idmap config OURDOMAIN : backend = ad
idmap config OURDOMAIN : schema_mode = rfc2307
idmap config OURDOMAIN : range = 10000-999999
idmap config OURDOMAIN : unix_nss_info = yes
winbind use default domain = true
winbind nss info = rfc2307
127.0.0.1 localhost
127.0.0.1 OurDomainName
(our Domain controller address) OurDomainName.in
However, the users having a space in their Windows Account usernames (for example, 'Charles B') are not able to login to the Ubuntu machine, even after modifying the NAME_REGEX to allow 'bad usernames'. There is no issue for the users who do not have space in the usernames and they are able to login normally. We are getting an impression that even after adding the Ubuntu machine to a Windows domain, the Linux policy is somehow overriding the Windows domain policy that has no problems with spaces in usernames.
We have tried enclosing the usernames in double quotes("), single quotes, adding escape sequence instead of space but did not work. Also tried using 'DOMAIN\Firstname Lastname' and "DOMAIN\Firstname Lastname" also but did not work.
Is there any way users with space in their Windows usernames can login to an Ubuntu machine joined to a Windows AD domain? We would like to know whether this is a general Linux built-in setting/behaviour.
Our configuration is as below:
Netplan: (DC address) along with Google DNS
AD: Kerberos Authentication enabled.
We have setup auto-home directory creation for new users in Ubuntu machine.
Our LDAP config is as below:
{BASE dc=(our DC name),dc=in
URI ldap=//(DC IP address)}
Windows AD server: we have enabled the setting 'Trust the computer for delegation in any service.
EDIT 23.6.22:
We also tried escaping the spaces like 'DOMAIN\Firstname/ Lastname' and "DOMAIN\Firstname/ Lastname" but did not work.
EDIT 29.6.22:
We have modified our smb.conf to include the following:
idmap config OURDOMAIN : backend = ad
idmap config OURDOMAIN : schema_mode = rfc2307
idmap config OURDOMAIN : range = 10000-999999
idmap config OURDOMAIN : unix_nss_info = yes
winbind use default domain = true
winbind nss info = rfc2307
Last edited: