Skip to content

Implement a way to clean up specified directories during user deletion #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ben-z opened this issue Nov 27, 2023 · 1 comment · Fixed by #6
Closed

Implement a way to clean up specified directories during user deletion #1

ben-z opened this issue Nov 27, 2023 · 1 comment · Fixed by #6

Comments

@ben-z
Copy link
Member

ben-z commented Nov 27, 2023

Currently, we hard-code deleting SSH directories during user deletion:

// delete SSH keys
await Promise.all(
usersToDelete.map(async (u) => {
await $`rm -rf ${config.user_ssh_key_base_dir}/${u}`;
})
);

Implement a generic way to do this, so that we can delete other directories like /var/lib/cluster/%U.

@Jimmyj30
Copy link
Contributor

Jimmyj30 commented Mar 2, 2025

Note for me, some users are requesting access after their active terms expired, so be really careful when actually removing user info (pending deletion should be true AND no active term should be specified AND default shell is nologin)

@ben-z ben-z closed this as completed in #6 Apr 26, 2025
@ben-z ben-z closed this as completed in 602fa4c Apr 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants