



                        Unix/Linux Users
                        
                        there are 3 types of Users on the System
                        
                        
                        1) SuperUser (named root) (any user w/ UID of zero)
                        
                        2) System Accounts (i.e. a User named oracle, apache, etc)
                            may have the Login Shell as /sbin/nologin
                        
                        3) User accounts (i.e. student00A, student15A, etc)

                        
                        -------------------------------------------------
                        
                        There are 3 ways to become a User
                        
                        1) Login as...
                             telnet and logged in as student00A
                             and give that user's password
                             
                        2) run the su command (Switch User)
                             studentxxA
                             studentxxB
                             
                             so student13A also has a student13B account
                             the password is the same:
                             LinuxTrainingMay10
                             
                             when I run the su command I MUST know the 
                             password for the user I am switching to
                             
                             I can run:
                             1) su student00B   <- leaves me in the current dir
                             2) su - student00B <- runs the user profile/setup commands
                                                    and puts me in the new user's
                                                    home dir
                             3) su <- without a UserId, I am attempting
                                       to switch to the root (SuperUser) account
                                       and I will need to know the root password
                                       
                         3) run sudo command to run a single command as ROOT
                                    however I must be authorized to run the sudo 
                                    command
                                  I also need to provide MY PASSWORD 
                                  
                                  there is command (run as root) to
                                  authorize sudoer
                                  # visudo
                                  
                    ----------------------------------------------------------
                    
                    There are a number of config file related to User Accounts:
                    
                    1) /etc/passwd <- the main login file
                        ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin
          
                        fields in this file (: delimted)
                        
                        1) the User ID -> ftp
                        2) used to be a hashed password, but this file
                            is World readable, so the password has been moved
                            to /etc/shadow, now an 'x' indicated there is 
                            a password
                        3) is the UserID number (UID), watch UIDs less than ???
                             on Unix box UID under 1000 are reserved for System accounts
                             on a Linux box the number is 500
                        4) is the GroupID (GID), watch for low-numbers 
                        5) is comments, maybe empty (was used by a command named: finger)
                             and can be changed by the chfn command 
                        6) is the User's Home Dir
                        7) is the Shell to start when they logon
                        
                    2) /etc/shadow file, host the hashed passwords, and is used as
                        part of the login logic
                        
                    3) /etc/group file, list the alternative groups a user
                        can change to
                             
                             
                       ------------------------------------------------
                       the command: passwd 
                       is used to change a password, root can change any
                       account's password
                       
                       
                    
                 --------------------------------------------------------
                 
                 there are several commands to manage file ownership
                 
                 # chown <- change Owner
                 # chgrp <- change Group
                 $ chmod <- change permissions
                 $ chfn  <- change the comments field in /etc/passwd
                    
                    
                    
                    
                    
                    
                    
                    
                                                    
                                                    
                             
                             
                             
                             
                             
                             
                             
                             
                             
                             
                             
                             
                             
