On a server we have discovered that we need to add the FTP passive command in every users .netrc file when we create a new user.
Can this and other defaults (in .something files) be automatically created when a new user is created?
On a server we have discovered that we need to add the FTP passive command in every users .netrc file when we create a new user.
Can this and other defaults (in .something files) be automatically created when a new user is created?
On almost all Linux distributions the standard user creation tools will copy the contents of
/etc/skel
into the users newly created home directory. At least for standard users and not system users.Some distributions like Debian/Ubuntu, which have the adduser command all provide a method where you can additional scripts to be called for post-processing after the new user is created.
@least Under redhat derivatives, useradd copies all the files found under /etc/skel to the new user's home.
Put default skeleton files in
/etc/skel
directory. Those files will be copied to new user home directory, just remember to use-m
parameter inuseradd
command.