how to delete a domain member machine account from linux PDC

How to delete the machine account which wascreated manually by the folliowing commands from linux pdc

#groupadd machines
#/usr/sbin/useradd -s /bin/false -d /dev/null -g machines machine_names$

account got created but want to delete , please help how to delete the same.

Who is Participating?
ravenplConnect With a Mentor Commented:
userdel -rf machine_name$
smbpasswd -x machine_name$
D_wathiAuthor Commented:
Sir: when tried with userdel and smbpasswd following is the result please help

# userdel -rf machine_name$

 userdel:error removing directory /dev/null

#smbpasswd -x machine_name
Failed to modify entry for user computer29$

D_wathiAuthor Commented:
userdel < machine account>
got deleted
ravenplConnect With a Mentor Commented:
Yes, -rf says to remove home directory as well, but since home was set to /dev/null - I was wrong with those options.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.