bash – 每次创建新用户时执行shell脚本

每次添加新用户时执行命令最简单的方法是什么?

我检查了/etc/adduser.conf但是没有什么东西在那里看起来会这样做?

我想将它添加用户.bashrc,以便jsut在登录时执行,但我宁愿在登录之前进行设置.

任何帮助,将不胜感激.

从男人adduser:
If  the  file  /usr/local/sbin/adduser.local exists,it will be exe‐
   cuted after the user account has been set up  in  order  to  do  any
   local setup.  The arguments passed to adduser.local are:
   username uid gid home-directory

您似乎可以在此处添加用户创建操作.

相关文章

用的openwrt路由器,家里宽带申请了动态公网ip,为了方便把2...
#!/bin/bashcommand1&command2&wait从Shell脚本并行...
1.先查出MAMP下面集成的PHP版本cd/Applications/MAMP/bin/ph...
1、先输入locale-a,查看一下现在已安装的语言2、若不存在如...
BashPerlTclsyntaxdiff1.进制数表示Languagebinaryoctalhexa...
正常安装了k8s后,使用kubect工具后接的命令不能直接tab补全...