plasma icon indicating copy to clipboard operation
plasma copied to clipboard

Issue with users deleted and then recreated

Open pierrepo opened this issue 2 years ago • 3 comments

Every academic year, we delete old student accounts and create new ones. Logins are the same and are recycled from one session to the next (stu-megm1-01, stu-megm1-02...)

We noticed an issue when account are re-created. For instance, with the account stu-megm1-50:

$ ls -al /srv/home/stu-megm1-50
total 32
drwxr-xr-x  5 stu-megm1-50 stu-megm1-50 4096 sept.  5 20:39 .
drwxr-xr-x 82 root         root         4096 sept.  3 16:48 ..
-rw-r--r--  1 stu-megm1-50 stu-megm1-50  220 févr. 25  2020 .bash_logout
-rw-r--r--  1 stu-megm1-50 stu-megm1-50 3771 févr. 25  2020 .bashrc
drwxrwxr-x  3 stu-megm1-50 stu-megm1-50 4096 sept.  5 20:39 .cache
drwxrwxr-x 12 stu-megm1-50 stu-megm1-50 4096 sept.  5 20:39 introduction_plasma
drwxrwxr-x  3 stu-megm1-50 stu-megm1-50 4096 sept.  5 20:39 .local
-rw-r--r--  1 stu-megm1-50 stu-megm1-50  807 févr. 25  2020 .profile

The user stu-megm1-50 opened the environment introduction_plasma and the corresponding directory has been created in his home directory with proper rights and owner.

After this account has been deleted and recreated, the user stu-megm1-50 is not able to load the same environment:

image

The error message is

Error: HTTP 500: Internal Server Error (Spawner failed to start [status=ExitCode=1, Error='', FinishedAt=2021-09-05T20:58:56.666401661Z]. The logs for stu-megm1-50 may contain details.)

If we look at his home directory:

$ ls -al /srv/home/stu-megm1-50
total 24
drwxr-xr-x  3 stu-megm1-50 stu-megm1-50 4096 sept.  5 20:58 .
drwxr-xr-x 82 root         root         4096 sept.  5 20:55 ..
-rw-r--r--  1 stu-megm1-50 stu-megm1-50  220 févr. 25  2020 .bash_logout
-rw-r--r--  1 stu-megm1-50 stu-megm1-50 3771 févr. 25  2020 .bashrc
drwxrwxr-x 12 stu-megm1-49 stu-megm1-49 4096 sept.  5 20:58 introduction_plasma
-rw-r--r--  1 stu-megm1-50 stu-megm1-50  807 févr. 25  2020 .profile

The directory introduction_plasma corresponding to the selected environment has been created, but with the wrong owner (stu-megm1-49 instead of stu-megm1-50), thus preventing Jupyter Lab to be correctly loaded with this environment.

It looks like a memory of old UIG/GID is kept and improperly used with recycled logins.

pierrepo avatar Sep 05 '21 19:09 pierrepo