

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
How to customize user accounts by using aliases, user specific files, and system wide files. It covers the use of the alias utility to save keystrokes, the tasks of the useradd utility, and the functions of user specific files such as .bashrc and .bash_profile. It also discusses the impact of changing these files after users have been created and the system wide files that control the experience of all users.
Typology: Study notes
1 / 3
This page cannot be seen from the preview
Don't miss anything!
Customizing User Accounts June 22, 2005 Using Nicknames for Commands: o You can assign to commands alternative names (“nicknames”). This is done by using the alias utility (p. 42). o Here is an example of how we might use alias to save us some work. Assume that you anticipate using the history utility often and we want to save us some keystrokes. Enter the following command and press ENTER. alias h=history Enter the following command and press ENTER. h Tasks of the useradd Utility: o A record of the user (including user ID #, group IP #, full name home directory, shell) is added to the /etc/passwd file. o A record of the user (including encrypted password) is added to the /etc/shadow file. o A home directory for the user is automatically created beneath /home. o The contents of the /etc/skel directory are copied to the user’s directory. These filenames are preceded by a dot, which makes them hidden files. Hidden files do not appear in a regular listing. You must also use the –a command option. User Specific Customization Files: o These files control the experience for an individual user. . bashrc – aliases specific to a user. When you create aliases with the alias utility, the alias only lasts until you log out.
If you would you like the aliases to be permanent, you may place them in the .bashrc file. .bash_profile – sets environment variables and determines which scripts are to be run when the user logs in. You can set data stored in your environment variables here. So far, we’ve learned how to add to the PATH variable in such a way that the new system path only lasts until you logout. If you would like to add to the system path permanently, you can do it here. The PS1 environment variable is one that I have yet to introduce. It is responsible for setting the format of your command prompt. By default, the PS1 variable is set to the following: PS1=”[\u@\h \W]# " o Below are examples of information that may be displayed in the command prompt. \a Rings a bell \d Date \h Hostname (such as localhost) \H Complete hostname (such as localhost.localdomain) \s Name of shell \t Time of day (24 hour format) \T Time of day (12 hour format) \u Username \w Complete working directory (such as /home/student) \W Basename of the working directory (such as student) ! Number in history list .bash_logout – controls events when user logs out o What problems occur if these files are changed after the users have been created?