Solaris Operating Environment Boot Camp

Team-Fly    

Solaris™ Operating Environment Boot Camp

By David Rhodes, Dominic Butler

Table of Contents
Chapter 10.  Administering Quotas

Rather than manually creating user quotas, the easiest way of setting them is to copy an existing user. For example, now that we have assigned testuser's quotas, we could create another user, say realuser, and assign them the same quotas as testuser by running the following command:

hydrogen# edquota p testuser realuser hydrogen#

We will take this idea a step further and incorporate it into our standard user setup by modifying the createUser script that we built in Chapter 3, "User Administration." This ensures that any new user will be created with all the correct quotas. Testuser's values will be used, and we'll modify the script by adding the lines shown in bold:

hydrogen# more createUser <lines removed for clarity> # # set our company defaults # home=/export/home shell=/bin/ksh skel=/etc/skel password=hViVZtexneY8Y # default encrypted password warnDays=5 validDays=60 quotaAccount=testuser <lines removed for clarity> # # set the password timeouts # passwd -f -w ${warnDays} -x ${validDays} ${user} # # update the account with any "standard" settings # edquota -p ${quotaAccount} ${user} exit 0 hydrogen#


    Team-Fly    
    Top
     

    Категории