Re: Very slow guest login
Dashamir Hoxha <[email protected]>
| Newsgroups | gmane.linux.terminal-server.general |
|---|---|
| Message-ID | <CAMucfLxPfevUHhroBZLbg94LKcNBiA579owjhYhnsKi__ODtwQ@mail.gmail.com> |
On Thu, Jan 17, 2019 at 10:58 PM Giacomo Trovato <giacomo-o6+VoJyZ4uJWk0Htik3J/[email protected]> wrote: > Hi Dashamir, > > could you please point me to how to modify the script so it can be > executed by a cron job (during night)? > On /etc/cron.d/ create a file named `reset-guest-accounts` with a content like this: 30 2 * * * root /usr/local/sbin/reset-guest-accounts.sh Then create a script `/usr/local/sbin/reset-guest-accounts.sh` that does the reset for all the users and make it executable. The script may be something like this: ``` #!/bin/bash for user in $(ls /home/guest-accounts/); do cd /home/guest-accounts/$user/ # . . . . . # reset commands # . . . . . cd - done ``` Thank you very much! > > --- > > Giacomo Trovato > > > > Il 10/01/2019 14:12 Dashamir Hoxha ha scritto: > > On Thu, Jan 10, 2019 at 2:05 PM Dashamir Hoxha <[email protected]> > wrote: > >> On Thu, Jan 10, 2019 at 1:27 PM Giacomo Trovato <giacomo-o6+VoJyZ4uJWk0Htik3J/[email protected]> >> wrote: >> >>> Hi All, >>> >>> on my school laboratory with LTSP-MATE (server on ESXI) I've 21 fat >>> clients that login as guest. >>> >> I just noticed that you are using a VMWare virtual machine. I don't know > anything about its performance > but a virtual machine with a virtual hard disk should be slower with disk > operations than a real HDD. > If you could attach a HDD to one of the 21 fat clients and make it a LTSP > server instead, this may improve > the performance a bit. It may be a lot of work, but this is just another > idea. > >> I've the reset guest account script. >>> >>> The login is very slow when all the students login at the same time >>> (also more than 5 minutes). >>> >>> I assume that's because the script copies at the same time all the home >>> folders from the template. >>> >>> Is there any way to speedup the process? >>> >>> Perhaps executing the script at logout or with a chron job at night? >>> >> In my opinion, resetting on logout is not safe, because a client may shut >> down abruptly, >> without making a logout (for example if the power goes off). A nightly >> reset with a cron job >> is also not very safe, since there may be multiple login/logout during >> the day. >> It is up to you to decide whether these risks are acceptable for your >> case, depending on your situation. >> >> Having said that, you may speed up a bit the process if you use `rsync` >> for resetting, instead of `rm` and `cp`. >> >> Regards, >> Dashamir >> > > _____________________________________________________________________ > Ltsp-discuss mailing list. To un-subscribe, or change prefs, goto: > https://lists.sourceforge.net/lists/listinfo/ltsp-discuss > For additional LTSP help, try #ltsp channel on irc.freenode.net > > _____________________________________________________________________ Ltsp-discuss mailing list. To un-subscribe, or change prefs, goto: https://lists.sourceforge.net/lists/listinfo/ltsp-discuss For additional LTSP help, try #ltsp channel on irc.freenode.net