Execute shell script everytime a new user is created

后端 未结 3 2007
小蘑菇
小蘑菇 2021-02-15 17:27

What would be the easiest way to execute a command everytime a new user is added?

I checked through /etc/adduser.conf but nothing is in there which looks li

3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-15 17:57

    I do not know direct way... But, you can check for changes in /etc/passwd file or /home directrory, using, for example inotifywait or using some cron job.

提交回复
热议问题