Power Point For Ubuntu Comend
Power Point For Ubuntu Comend
Objectives
This PPT introduces the concepts of AIX users and groups, and also the files that contain user account information. Defines the concepts of users and groups, and define how and when these should be allocated on the system Add/Change/Delete user and group accounts Identify the data files associated with users
Groups
A group is a set of users, all of whom need access to a given set of files Every user is a member of at least one group and can be a member of several groups The user has access to files in their groupset. To list the groupset use groups The users primary group is used for file ownership on creation.To change the primary group use the newgrp Default groups: -System administrators -staff ordinary users
Groups
User Hierarchy
To protect important users/groups from members of the security group AIX has admin users and admin groups Only root can add/change/remove an admin user or admin group Any user on the system can be defined as an admin user regardless of the group they are in
Security Logs
Contains the environment attributes for users. /etc/security/lastlog Contains the last login attributes for users. /etc/security/limits Contains process resource limits for users. /etc/security/user Contains extended attributes for users. /usr/lib/security/mkuser.default Contains the default attributes for new users. /usr/lib/security/mkuser.sys Customizes new user accounts. /etc/passwd Contains the basic attributes of users. /etc/security/passwd Contains password information.
/etc/security/login.cfg Contains system default login parameters. /etc/utmp Contains a record of users logged into the system. /var/adm/wtmp Contains connect-time accounting records. /etc/security/failedlogin Records all failed login attempts. /etc/motd Contains the message to be displayed every time a user logs in to the system. /etc/environment Specifies the basic environment for all processes. /etc/profile Specifies additional environment settings for all users. $HOME/.profile Specifies environment settings for a specific user. /etc/group Contains the basic attributes of groups. /etc/security/group Contains the extended attributes of groups.
User Commands
mkuser Creates a new user account. passwd Creates or changes the password of a user. chuser Changes user attributes. lsuser Displays user account attributes. Rmuser Removes a user account. chsec Changes the attributes in the security stanza files. login Initiates a user session. who Identifies the users currently logged in. dtconfig Enables or disables the desktop autostart feature.
List users
SYNTAX: lsuser To display the user ID and group-related information for ALL #lsuser a id home ALL To display the user ID and group-related information for the root account in stanza form, enter: # lsuser -f -a id pgrp home root To display all the attributes of user smith in the default format, enter: # lsuser smith To display all the attributes of all the users, enter: # lsuser ALL
Group Commands
mkgroup chgroup lsgroup Rmgroup Creates a new group account. Changes group attributes. Displays selected or all groups on the system. Removes a group account.
To create the group using smit: #smit mkgroup To create the group administrator (-a) parameter is added with mkgroup: # mkgroup a To change attributes of the group: #smit chgroup To change either the administrators or the members a group for which they are group administrator: #chgrpmem
To remove a group from the system. This command has no options and the only parameter is the group name. Only the root user can delete an administrative group. #rmgroup To list selected or all groups on the system. The data is presented in line format by default or in colon format (-c) or in stanza format (-f). lsgroup [-c|-f] [-a attribute] {ALL|groupname} #lsgroup c f ALL
Summary
User and groups can be added and deleted from the system SMIT or by high level commands Passwords must be set for all users either using pwdadm or passwd Administrative users and groups can only be administered by root Every user must be in at least one group Certain groups give users additional privileges Security files are located in ACSII text files in /etc and /etc/security
Exercises
The following exercises provide sample topics for self study. 1. Add a new user account (james) and try to log in to the new account. Can you log in without creating a password for this account? 2. Create a password for a newly created user account (james). 3. You want all the users to get the following message when they log in: *************************************************************************** Please assemble in the meeting room at 13:00 hrs on Feb.20,2009 **************************************************************************** Which file needs to be edited to contain this message so that the message is displayed when a user logs in? 4. Move the file /etc/utmp to /etc/wtmp.org. Run the who command. What is the output? 5. Change the password of a user account who does not remember his old password. 6. How can you disable the desktop autostart? 7. Display the attributes of the user account. 8. Permanently change your shell prompt to display the current directory.