0

I want to add user to specific UNIX group only for 6 months. Then I want automatically kick him out of this group and I don't want to expire his username. Which command should I use?

Jeff Schaller
  • 66,199
  • 35
  • 114
  • 250

1 Answers1

1

One thing that comes to mind is that you could schedule a cron job an at job to run the command that removes the user from the group.

Edit: Based on telcoM 's comment

Kusalananda
  • 320,670
  • 36
  • 633
  • 936
gomfy
  • 111
  • 3
  • 1
    Actually [an `at` job](https://unix.stackexchange.com/q/97882/258991) might be a better choice, since it's a task that needs to happen just once at a particular future time. Cron jobs are better suited for repeating tasks. – telcoM Jan 23 '20 at 14:14
  • Thanks for pointing that out! Updated answer. – gomfy Jan 24 '20 at 15:40