1

I have an AD Domain run by Samba4 and have successfully joined Ubuntu workstations to that domain and able to add users and log into the workstation with domain accounts. Now, I am needing to remove a domain account from that workstation so that only the end user who will be using that workstation has an account on that system--so that the temporary domain account used to configuration does not show up in the GDM login screen.. I know how to remove local users but I cannot find how to remove a domain account from said workstation. Looking online and google only tells me how to remove a domain account completely from the domain. I think it may be in my terminology when I run my search but I am not sure.

Thank you in advance.

Scott

muru
  • 197,895
  • 55
  • 485
  • 740

2 Answers2

0

Ubuntu 22.04.1 LTS

Simply removing the home folder did not work for me.

rm -r /home/user_to_remove

Another suggested solution was to use the following command:

sudo userdel --remove-home user_to_remove

But the command said could not find user. In case it was a misspelled I tried to list all available users with:

cut -d: -f1 /etc/passwd

From this answer: https://askubuntu.com/a/410274

The user was not in the list. The answer above specifically highlighted that it only listed local users.

TL;DR;

What finally worked was to go into:

Settings -> Users

Then click on the "user_to_remove" and then "Remove User..." button.

Heneer
  • 101
0

Just remove the domain useres home directory under /home. Ubuntu doesn't store any domain user files outside /home

sмurf
  • 4,680