Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

3 Answers 3

up vote 8 down vote accepted

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.

share|improve this answer

@least Under redhat derivatives, useradd copies all the files found under /etc/skel to the new user's home.

share|improve this answer

Put default skeleton files in /etc/skel directory. Those files will be copied to new user home directory, just remember to use -m parameter in useradd command.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.