Chapter 4 . Learning Basic Administration 143 Creating (Web hosting faq)

Chapter 4 . Learning Basic Administration 143 Creating User Accounts Every person who uses your Linux system should have a separate user account. Having a user account provides each person with an area in which to securely store files as well as a means of tailoring his or her user interface (GUI, path, environment variables, and so on) to suit the way that he or she uses the computer. You can add user accounts to most Linux systems in several ways Red Hat systems use the redhat-config-users utility, for example, and SUSE offers a user setup module in YaST. This chapter describes how to add user accounts from the command line with useradd because most Linux systems include that command. Adding Users with useradd The most straightforward method for creating a new user from the shell is with the useradd command. After opening a Terminal window with root permission, you simply invoke useradd at the command prompt, with details of the new account as parameters. The only required parameter is the login name of the user, but you probably want to include some additional information ahead of it. Each item of account information is preceded by a single letter option code with a dash in front of it. Table 4-2 lists the options available with useradd. Table 4-2 useradd Command Options Option Description -c comment Provide a description of the new user account. Often the person s -c comment here full name. Replace comment with the name of the user account (-c jake). Use quotes to enter multiple words (-c jake jackson ). -d home_dir Set the home directory to use for the account. The default is to name it the same as the login name and to place it in /home. Replace home_dir with the directory name to use (for example, -d /mnt/homes/jake). -D Rather than create a new account, save the supplied information as the new default settings for any new accounts that are created. -e expire_date Assign the expiration date for the account in MM/DD/YYYY format. Replace expire_date with a date you want to use (-e 05/06/2005). Continued
Note: In case you are looking for affordable webhost to host and run your servlet application check Vision servlet hosting services

Leave a Reply