当我创建新用户时,如何在其主目录中自动创建.virtualenvs目录?
我想在创建新用户时在每个新用户的主目录中自动创建一个名为“.virtualenvs”的目录。
我使用useradd命令来创建新用户。
创建目录/etc/skel/.virtualenvs
。 /etc/skel
目录将用作新主目录的框架。
它在/etc/adduser.conf
定义:
# The SKEL variable specifies the directory containing "skeletal" user # files; in other words, files such as a sample .profile that will be # copied to the new user's home directory when it is created. SKEL=/etc/skel