I need to create a local user with the same name as a domain user under CentOS with Likewise installed.
When I use Useradd it says user exists, because a domain user with the same name exists.
It is a service account for backup and does not work using a domain account. On machines where the local account was added before likewise was installed it works fine.
Is there a way to temporarily disable this check?
I worked out that you can do this
add your user/change password, etc. then
If you
id
your user with and without the domain name you will find they both have the same uid. This means that both versions of the username map to the same user account in Linux.I think the simpler problem to solve would be why you need to have exactly the same username for a locally running process. Or remove the domain account from the Linux host. I don't think you can have both because even if you manage to set up both accounts, Linux won't be able to distinguish them via their username when you come to try and use one or the other.
i have created linux local user, with the same name as a likewise domain user.
if your server AD authenticated via smb & winbind daemon follow below method.
create required local user account.
Post local user creation start the both the services "smb" & "winbind"
if your server AD authenticated via "sssd" daemon follow below method.
create required local user account. post local user account creation on linux machine try to start service as it was before "sssd"
below listed commands will help you to identify which authentication service linux machine used for AD integration