1

I succesfully join fedora and ubuntu thanks to realmd package. After I join the machine I can also log with a domain user with no problem. What I'd like to do now is to move and existing local user to a domain one. I found usermod useful to change a local username. Here is the command:

sudo usermod --login newuser --home /home/newuser -m olduser

Then I just need to modify /etc/passwd and replace what's left about 'olduser' with 'newuser'.

However, renaming the username to a domain user is not enough: it will be a local user anyway with a local password. How do I make an existing user a domain user ?

HBruijn
  • 72,524
  • 21
  • 127
  • 192
suoko
  • 49
  • 2

1 Answers1

0

Create a domain account named the same, edit the uidNumber attribute to match the local UID using Attribute Editor in AD / on Windows... Make sure to also set gidNumber for primary group, set homedir and the like...

This works at least on RHEL using SSSD...

jmp242
  • 668
  • 3
  • 13
  • I have no UNIX attributes enabled in AD yet. I was thinking about a temporary solution similar to time machine in my case: I should backup everything on an external HD and then restore it to the domain joined user home. Thanks – suoko Mar 11 '15 at 09:26
  • What version of AD? Server 2008R2+ already have the attributes... – jmp242 Mar 11 '15 at 12:32
  • Yup, go to the user in AD and click on the unix attributes tab. You may have to enable advanced views in AD Users and Computers for this to work. – yoshiwaan Mar 11 '15 at 22:07