I have a script that programmatically creates users, but we'd like to delete the users after 48 hours, as well as any files they own.
I know you can set an expiration with the useradd command, but I don't know how to take the next step of deleting the user and its associated files on expiration.
Is there an easy way to do this?
Thank you!