Bash Profile

Bash profile consists of two files:
/etc/skel/.bash_profile
/etc/skel/.bashrc
For some reason, all the entries in .bash_profile are commented out by default; not sure why.

When doing a useradd, a -m needs to be used in order to get these files copied to the users homedir. This switch will also create the homedir if it doesn’t exist. Seems like a good reason to add the following to root’s .bashrc:
alias useradd=’useradd -m’

2 comments

  1. Hi Martin,

    With another year of learning since I wrote that, I would now suggest leaving useradd alone and not aliasing it. There is a another command ‘adduser’ that provides a front end to useradd and does all the Debian default stuff like creating the default config files.

    Regards
    Steve

Leave a comment