AIX System Administration Class  Justin Richard Bleistein IBM POWER Systems/PowerVM/AIX/PowerHA/TSM/Oracle database/Progra...
Class Syllabus <ul><li>Monday thru Friday – 9:30am to 5:30pm </li></ul><ul><li>9:30am  –  Class starts </li></ul><ul><li>1...
Getting to know you. <ul><li>Going around the room: </li></ul><ul><li>What is your name? </li></ul><ul><li>What is your cu...
Unix Overview
UNIX Overview <ul><li>Unix is an operating system originally developed by a group of AT&T Bell lab employees. It was devel...
UNIX Overview <ul><li>The history of UNIX goes back to the 1960’s. Massachusetts Institute of Technology (MIT), AT&T Bell ...
AIX Overview
AIX Overview <ul><li>AIX stands for Advanced Interactive eXecutive </li></ul><ul><li>AIX is IBM’s version of the UNIX oper...
AIX Overview <ul><li>AIX comes with an LVM, Logical Volume Manager, integrated into the operating system by default. It ha...
AIX Overview <ul><li>AIX has a lot in common with other proprietary Unix operating systems. Proprietary Unix operating sys...
AIX Overview <ul><li>By default AIX comes with a software component known as WorkLoad Manager – WLM. This software allows ...
AIX Overview <ul><li>AIX comes with a backup utility known as mksysb – MaKe SYStem Backup. This utility will allow you to ...
AIX Overview <ul><li>Starting in AIX version 5.1, Linux affinity is integrated into the operating system. </li></ul><ul><l...
AIX overview <ul><li>AIX version release history: </li></ul><ul><li>1986 – AIX version 1.0 – 2.0 </li></ul><ul><li>1989 – ...
AIX overview
A word on Linux <ul><li>Linux is a clone of the UNIX operating system. It is technically not considered UNIX. </li></ul><u...
IBM POWER Servers
IBM POWER line of servers p6 – 520 Express
IBM POWER line of servers p6 – 550 Express
IBM POWER line of servers p6 – 560 Express
IBM POWER line of servers p6 - 570
IBM POWER line of servers p6 – 595
IBM POWER Servers
IBM POWER line of servers p7 – 710 Express <ul><li>Low end class </li></ul><ul><li>Up to 64 GB of memory/RAM </li></ul><ul...
IBM POWER line of servers p7 – 720 Express <ul><li>Low end class </li></ul><ul><li>Up to 128 GB of memory/RAM </li></ul><u...
IBM POWER line of servers p7 – 730 Express <ul><li>Low end class </li></ul><ul><li>Up to 128 GB of memory/RAM </li></ul><u...
IBM POWER line of servers p7 – 740 Express <ul><li>Low end class </li></ul><ul><li>Up to 256 GB of memory/RAM </li></ul><u...
IBM POWER line of servers p7 – 750 Express <ul><li>Low end class </li></ul><ul><li>Up to 512 GB of memory/RAM </li></ul><u...
IBM POWER line of servers p7 - 770 <ul><li>Midrange class </li></ul><ul><li>Up to 4 building blocks </li></ul><ul><li>Up t...
IBM POWER line of servers p7 - 780 <ul><li>Midrange class </li></ul><ul><li>Mainframe inspired </li></ul><ul><li>Up to 512...
IBM POWER line of servers p7 - 795 <ul><li>High end/Enterprise class </li></ul><ul><li>Mainframe inspired </li></ul><ul><l...
IBM POWER Blade Servers
IBM POWER line of servers p6 – JS12, JS22, JS23, and JS43 J43
IBM POWER Blade Servers
IBM POWER line of servers p7 – PS700, PS701, and PS702 PS700 – Single wide blade. Up to 64 GB of memory/RAM Up to 1 X 3.0 ...
IBM POWER line of servers p7 – Bladecenters
Throughout IBM AIX system history
Throughout IBM AIX system history <ul><li>RT – AIX version 1.0 – 2.0 only. </li></ul>
Throughout IBM AIX system history <ul><li>320 system </li></ul>
Throughout IBM AIX system history <ul><li>590 </li></ul>
Throughout IBM AIX system history <ul><li>RS/6000 43P </li></ul>
Throughout IBM AIX system history <ul><li>Another 43P </li></ul>
Throughout IBM AIX system history <ul><li>F50 </li></ul>
Throughout IBM AIX system history <ul><li>42T </li></ul>
Throughout IBM AIX system history <ul><li>RS/6000 B50 </li></ul>
Throughout IBM AIX system history <ul><li>H80 </li></ul>
Throughout IBM AIX system history <ul><li>S80 </li></ul>
Throughout IBM AIX system history <ul><li>RS/6000 SP </li></ul>
Throughout IBM AIX system history <ul><li>More RS/6000 SPs </li></ul>
Our Lab <ul><li>The configuration of the ATS lab, The Innovation Center, we’ll be using in this week’s class is as follows...
Our Lab <ul><li>Each blade has 13 AIX LPARS created on them. AIX version 6.1 TL 6 SP 2. </li></ul><ul><li>We will be using...
Our Lab <ul><li>We will be using 2 LPARs from the second blade, Blade # 14: </li></ul><ul><li>Gvicaix06 </li></ul><ul><li>...
Our Lab <ul><li>Our lab network is a standard, Class C, flat network, on subnet 192.168.240. </li></ul><ul><li>The IP addr...
Our Lab <ul><li>On your desktop you should have an application called, Putty. Go ahead and double-click on it: </li></ul>
Our Lab <ul><li>Once the application starts type in the IP address of your assigned LPAR: </li></ul><ul><li>Be sure that “...
Our Lab <ul><li>The Integrated Virtualization Manager, IVM, is a web interface which allows you to manage a physical syste...
Our Lab
Our Lab
Installing the AIX Operating System
Installing the AIX Operating System <ul><li>The AIX operating system is shipped from IBM traditionally on 8 CDs, or 2 DVDs...
Installing the AIX Operating System <ul><li>There are three types of AIX BOS installations. </li></ul><ul><li>New and Comp...
Installing the AIX Operating System <ul><li>BOS installations can be accomplished with the following methods. </li></ul><u...
Installing the AIX Operating System
Installing the AIX Operating System
Installing the AIX Operating System
Installing the AIX Operating System
Installing the AIX Operating System
Installing the AIX Operating System
Installing the AIX Operating System
Installing the AIX Operating System
Installing the AIX Operating System
Installing the AIX Operating System
Installing the AIX Operating System
Installing the AIX Operating System
Logging into the System
High level Components of a Unix system
AIX – Logging into the system
AIX – Logging into the system <ul><li>After the system boots, or anytime you connect to the system you will be presented w...
AIX – Logging into the system <ul><li>By installation default, when you login as the root user, you are not prompted for a...
AIX – Logging into the system <ul><li>After successfully identifying yourself to the system, and logging in you will be pr...
AIX – Logging into the system <ul><li>A shell is how the user/you communicates with the operating system. Think of it as a...
AIX – Logging into the system <ul><li>A user communicates with a Unix system with commands, which are submitted to the sys...
AIX – Logging into the system <ul><li>Ex of a command: </li></ul><ul><li>#  ls –l /home </li></ul><ul><li>ls  = Command/pr...
AIX – Logging into the system <ul><li>The id command will display the user you are logged into the system as.  Notice how ...
AIX – Logging into the system <ul><li>To exit the Korn shell, type in the command “exit”. </li></ul><ul><li>Once you do th...
AIX – Logging into the system <ul><li>Notice how the password was not visible when you entered it. </li></ul><ul><li>This ...
Interacting with Unix
Interacting with Unix <ul><li>It’s very imperative to understand that Unix is case sensitive. That means that just about e...
Interacting with Unix <ul><li>You can see the current month’s calendar with the following command: </li></ul><ul><li>#  ca...
Interacting with Unix <ul><li>You can see the whole year calendar by feeding the command the year. Note, doesn’t have to b...
Interacting with Unix <ul><li>You can also specify a specific month of a year. </li></ul><ul><li>#  cal 8 2010 </li></ul><...
Interacting with Unix <ul><li>Let’s say you wanted to know the current date, and time. Use the Unix date command </li></ul...
Interacting with Unix <ul><li>Unix also has a built in calculator. It’s called bc for Basic Calculator. </li></ul><ul><li>...
Interacting with Unix <ul><li>Unix comes with a text editor called vi. This stands for VIsual editor. </li></ul><ul><li>Yo...
Interacting with Unix <ul><li>Short VI reference – “Moving around” </li></ul><ul><li>ESC + x  = Deletes a single character...
Interacting with Unix <ul><li>To view the contents of the file you just created with the vi text editor, or any file on th...
Interacting with Unix <ul><li>You can view the first N lines of a file with the head command. </li></ul><ul><li>#  head -1...
Interacting with Unix <ul><li>You can view the last N lines of a file with the tail command. </li></ul><ul><li>#  tail -2 ...
Interacting with Unix <ul><li>You can list the contents of a file with all of the lines in the file numbered with the cat ...
Interacting with Unix <ul><li>If you wanted to count the number of lines, words, or characters of a file, then you can use...
Interacting with Unix <ul><li>You can use the cut command to display certain portions of a file, or other output out. </li...
Interacting with Unix <ul><li>The command grep, will search for a specific string in a file, or other output, and will dis...
Interacting with Unix <ul><li>The banner command can be very useful. It’s a way of displaying strings, which are imperativ...
Interacting with Unix <ul><li>Unix has online help available. This is the equivalent of pressing <F1> on a Windows system....
Interacting with Unix <ul><li>There is a special symbol called a pipe. The symbol is |, the vertical bar. It’s located rig...
Interacting with Unix <ul><li>What happened with the pipe in the previous example, is it took the output of the date comma...
Interacting with Unix <ul><li>Let’s say you issued the command: prtconf, the command which lists the hardware configuratio...
Interacting with Unix <ul><li>There are two what they call pager commands you can use which will preclude long outputs suc...
Interacting with Unix <ul><li>#  prtconf | pg </li></ul><ul><li>System Model: IBM,9117-MMA </li></ul><ul><li>Machine Seria...
Interacting with Unix <ul><li>Variables are used to store other values. They are most useful in programming languages. </l...
Interacting with Unix <ul><li>There are some pre-defined variables which come set with the shell. </li></ul><ul><li>These ...
Interacting with Unix <ul><li>One thing you can do with the pre-defined shell variables is change the korn shell root prom...
Navigating around the system
AIX – Navigating around the system <ul><li>UNIX/AIX has a filing system which it uses to organize the data which is stored...
AIX  - Navigating around the system <ul><li>Directory structure example </li></ul>
AIX – Navigating around the system <ul><li>Type in the command: “pwd” </li></ul><ul><li>#  pwd </li></ul><ul><li>/ </li></...
AIX – Navigating around the system <ul><li>To list all of the directories, and files in your current directory type in the...
Navigating around the system <ul><li>To determine which object is a file, and which one is a directory issue the ls comman...
Navigating around the system <ul><li>Long listing of a directory. </li></ul><ul><li>#  ls -l </li></ul><ul><li>total 1368 ...
Navigating around the system <ul><li>What the objects in / are used for: </li></ul><ul><li>admin  – Directory for admin te...
Navigating around the system <ul><li>Let’s move to the /tmp directory. You change directories in Unix with the cd command,...
Navigating around the system <ul><li>To move back to the directory you were just in, you can use the – argument to the cd ...
Navigating around the system <ul><li>To move back to your home directory, use the cd command with no arguments. </li></ul>...
Navigating around the system <ul><li>Creating a directory, will give you a place to store files, and other directories (su...
Navigating around the system <ul><li>Go ahead and create another sub-directory in this current directory, and also some em...
Navigating around the system <ul><li>One imperative concept to keep in mind when discussing directories, and files, is the...
Navigating around the system <ul><li>Getting back to creating directories. </li></ul><ul><li>Let’s say you wanted to creat...
Navigating around the system <ul><li>This did not work either. Why? It didn’t work because a directory needs to exist befo...
Navigating around the system <ul><li>There are two special files called, “.” and “..” </li></ul><ul><li>. Represents the p...
Navigating around the system <ul><li>You can use wildcards as a way to display files on a Unix system. </li></ul><ul><li>W...
Navigating around the system <ul><li>Another way to create a file is to re-direct a command’s output to a file. This is ca...
Navigating around the system <ul><li>If you use a single greater than sign again, it will overwrite the contents of the ex...
Navigating around the system <ul><li>There is a special file in Unix called /dev/null, among others. </li></ul><ul><li>Thi...
Navigating around the system <ul><li>If you wanted output to be re-directed to a file and to your stdout, the screen simul...
Navigating around the system <ul><li>If you wanted to copy a file, you would use the cp command. </li></ul><ul><li>#  ls -...
Navigating around the system <ul><li>If you wanted to move/rename a file, you would use the mv command. </li></ul><ul><li>...
Navigating around the system <ul><li>To remove a directory you use the rmdir command, which is short for ReMove DIRectory:...
Navigating around the system <ul><li>To remove a file use the rm command, which is short for ReMove. </li></ul><ul><li>#  ...
Navigating around the system <ul><li>Getting back to directories for a moment: </li></ul><ul><li>Create a directory called...
Navigating around the system <ul><li>Now attempt to remove this directory: </li></ul><ul><li>#  rmdir /tmp/testdir </li></...
SMIT – System Management Interface Tool
SMIT <ul><li>AIX has the most extensive unix systems management tool – smit </li></ul><ul><li>SMIT  </li></ul><ul><ul><li>...
SMIT <ul><li>#  smitty </li></ul>
SMIT
SMIT
SMIT <ul><li>To move back a screen in smit press the <F3> key. </li></ul>
SMIT <ul><li>Pressing <F10> will exit smit all together. </li></ul><ul><li># </li></ul>
SMIT <ul><li>Fast paths are a shortcut in SMIT, allowing you to jump down the menu hierarchy right to the menu you desire....
SMIT <ul><li>The fast path of a specific menu screen can be determined by pressing the <F8> key while in that menu. Note, ...
SMIT <ul><li>You can use the smit <F6> key while in a menu, to determine which command smit is calling under the convers. ...
SMIT <ul><li>You could use the SMIT <F9> key to exit out to an AIX command shell prompt, temporarily, from within a SMIT m...
SMIT
SMIT <ul><li>Type in the command exit, to return to the SMIT menu session. </li></ul><ul><li># </li></ul><ul><li>#  exit <...
SMIT <ul><li>You can press <F1> at any point while in SMIT to view the help of that particular SMIT menu screen </li></ul>...
SMIT <ul><li>Go to the change user attribute smitty window via it’s fastpath. Hit <F4>. This will generate a pick list. Sm...
SMIT <ul><li>Smitty also has a search string function. When you want to search for something in a smit screen use the / ke...
SMIT <ul><li>Hit <F10> to exit smitty. </li></ul>
SMIT <ul><li>SMIT also has a graphical version. </li></ul>
SMIT <ul><li>In graphical SMIT, there is a graphic of a man, “rocky”, running when a command is running: </li></ul>
SMIT <ul><li>In graphical SMIT there is a graphic of a man, “rocky”, who falls flat on his face when a command fails. </li...
SMIT <ul><li>In graphical SMIT there is a graphic of a man, “rocky”, who raises his hand in triumph following a successful...
SMIT
AIX User Management
AIX User Management <ul><li>To create a user-id on AIX, either use the smit, System Management Interface Tool, or the comm...
AIX User Management <ul><li>What is the mkuser doing ? </li></ul><ul><ul><li>Modifying files: </li></ul></ul><ul><ul><ul><...
AIX User Management <ul><li>Users on the system are defined in the /etc/passwd file. </li></ul><ul><li>This file has the f...
AIX User Management <ul><li>The shadow file, is where the encrypted password of all users are kept. The /etc/passwd file i...
AIX User Management <ul><li>The /etc/group file contains the user/group memberships of all users defined to the system. No...
AIX User Management <ul><li>After the user is created you will see it via the id command, or listusers command. </li></ul>...
AIX User Management <ul><li>Now log off, by typing in exit, and then login again as user justin. </li></ul><ul><li>#  exit...
AIX User Management <ul><li>Notice, even though you as root set this user’s password. The system still prompts the user to...
AIX User Management <ul><li>Notice this initial directory you are placed in when you first log into the system. The defaul...
AIX User Management <ul><li>Recommended home directory setup for environments.  Justin Tip!!!  Setup a sub home directory ...
AIX User Management <ul><li>The application administrator's home directories: </li></ul><ul><li>#  ls -ld /home/appl </li>...
AIX User Management <ul><li>Reset your own password to something different. </li></ul><ul><li>$  id </li></ul><ul><li>uid=...
AIX User Management <ul><li>Let’s say that user justin calls you, the admin, and confesses to you that they have forgotten...
AIX User Management <ul><li>To determine who is currently logged into the system use the who command </li></ul><ul><li>#  ...
AIX User Management <ul><li>The last command can assist you in determining the login history of a user into the system. </...
AIX User Management <ul><li>Let’s say you wanted to perform some sort of system maintenance, and you didn’t want any users...
AIX User Management <ul><li>Note, the root user can bypass this restriction and logon. Also, user’s currently logged on, w...
AIX User Management <ul><li>When you remove this file, then users will be able to log into the system once again. </li></u...
AIX User Management <ul><li>Log out, with the exit command, and then log back into the system as the justin user, to verif...
AIX User Management <ul><li>Logout with, exit and log back into the system again as root: </li></ul><ul><li>$  exit </li><...
AIX User Management <ul><li>The default message of the day, MOTD, which is displayed when you log into the system can be c...
AIX User Management <ul><li>#  cat /etc/motd </li></ul><ul><li>Welcome to my AIX system </li></ul><ul><li>#####  #####  ##...
AIX User Management <ul><li>Log off by typing in exit, and then login as root again. </li></ul><ul><li>AIX Version 6 </li>...
AIX User Management <ul><li>Let’s say you as as a user, didn’t  care to see the message of the day, MOTD, displayed to you...
AIX User Management <ul><li>While in the home directory of that user, /home/justin, touch a file called .hushlogin. </li><...
AIX User Management <ul><li>Type exit, and then re-connect to the system again. Note, no MOTD is displayed upon login. </l...
AIX User Management <ul><li>Exit and login as root again. Look at the message displayed prior to logging into the system.T...
AIX User Management <ul><li>There is a file called /etc/security/login.cfg which controls the global login, not user attri...
AIX User Management <ul><li>Close your putty session, logging out of the system, and then log back into the system as root...
AIX User Management <ul><li>Now open a console/virtual terminal session to your system via the IVM. Notice the login heral...
AIX User Management <ul><li>What did you notice? The default/old herald message is still being displayed when you log into...
AIX User Management
AIX User Management <ul><li>If you close your putty session and then open it again, you will see that your other non-conso...
AIX User Management <ul><li>Notice back in the herald message login and password prompts: </li></ul><ul><li>Welcome to Com...
AIX User Management <ul><li>#  cd /etc/security </li></ul><ul><li>#  pwd </li></ul><ul><li>/etc/security </li></ul><ul><li...
AIX User Management <ul><li>You can change the password prompt totally as well. </li></ul><ul><li>#  cd /etc/security </li...
AIX User Management <ul><li>To change the default GECOs, user’s real life information, use the following command: </li></u...
AIX User Management <ul><li>As you may have noticed in the past motd discussion, the .hushlogin file has a period in front...
AIX User Management <ul><li>You may also have noticed, that there are already two files in your home directory with period...
AIX User Management <ul><li>The file /etc/security/user. This file contains the default user attributes for new users, as ...
AIX User Management <ul><li>… </li></ul><ul><li>snapp: </li></ul><ul><li>admin = false </li></ul><ul><li>rlogin = false </...
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Aix overview
Upcoming SlideShare
Loading in...5
×

Aix overview

15,260

Published on

AIX step by step

Published in: Technology
2 Comments
14 Likes
Statistics
Notes
No Downloads
Views
Total Views
15,260
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
1,186
Comments
2
Likes
14
Embeds 0
No embeds

No notes for slide

Aix overview

  1. 1. AIX System Administration Class Justin Richard Bleistein IBM POWER Systems/PowerVM/AIX/PowerHA/TSM/Oracle database/Programmer
  2. 2. Class Syllabus <ul><li>Monday thru Friday – 9:30am to 5:30pm </li></ul><ul><li>9:30am – Class starts </li></ul><ul><li>10:30am – 15 minute morning break </li></ul><ul><li>10:45am – Class resumes from first break </li></ul><ul><li>12:00pm – Break for lunch </li></ul><ul><li>1:00pm – Class resumes from lunch </li></ul><ul><li>3:00pm – 15 minute afternoon break </li></ul><ul><li>3:15pm – Class resumes from second break </li></ul><ul><li>5:30pm – Class ends for the day </li></ul><ul><li>Instructor: Justin Richard Bleistein </li></ul><ul><li>Phone: (856) 912 – 0861 </li></ul><ul><li>Email: [email_address] </li></ul>
  3. 3. Getting to know you. <ul><li>Going around the room: </li></ul><ul><li>What is your name? </li></ul><ul><li>What is your current position with the company? </li></ul><ul><li>What is your field of technical expertise? </li></ul>
  4. 4. Unix Overview
  5. 5. UNIX Overview <ul><li>Unix is an operating system originally developed by a group of AT&T Bell lab employees. It was developed in 1969. – (Dennis Ritchie, and Ken Thompson were the main developers). </li></ul><ul><li>The current owner of the UNIX trademark, is the Open Group. </li></ul><ul><li>The current owner of the UNIX System V code, which AT&T originally wrote is SCO. </li></ul><ul><li>The UNIX code was licensed to commercial companies such as IBM, Oracle/Sun, and Hewett Packard, so they could create their own version of the UNIX operating system. </li></ul><ul><li>University of California, Berkeley developed their own versions of the UNIX operating system called Free BSD, and Net BSD. These are not as widely used as the commercial, or Linux like operating systems. </li></ul>
  6. 6. UNIX Overview <ul><li>The history of UNIX goes back to the 1960’s. Massachusetts Institute of Technology (MIT), AT&T Bell Labs, and General Electric (GE) developed an experimental operating system called Multics. (Multiplexed Information and Computing Service). </li></ul><ul><li>AT&T at some point pulled out of the Multics project. Some of the developers continued to work on it. In the 1970’s a project known as Unics, which later changed to UNIX commenced. </li></ul><ul><li>The first version was written in assembly language, but in 1973 it was re-written using the C programming language. </li></ul>
  7. 7. AIX Overview
  8. 8. AIX Overview <ul><li>AIX stands for Advanced Interactive eXecutive </li></ul><ul><li>AIX is IBM’s version of the UNIX operating system. </li></ul><ul><li>AIX, IBM’s version of UNIX competes with Microsoft Windows server operating systems, and other proprietary UNIX operating systems such as, Oracle’s Sun Solaris, Hewett Packard’s HP-UX, and Tru64 Unix. </li></ul><ul><li>AIX is mainly used for enterprise business computing. </li></ul><ul><li>The latest version of AIX, is AIX 6.1. This version was made generally available by IBM in 2007. AIX version 7.1 is currently as of, 2010, available via the IBM Open Beta release program. </li></ul>
  9. 9. AIX Overview <ul><li>AIX comes with an LVM, Logical Volume Manager, integrated into the operating system by default. It has for years. </li></ul><ul><li>AIX supports LPARS, Logical Partitions. </li></ul><ul><li>AIX supports both hardware(LPARS) and software(WPARS) virtualization. </li></ul><ul><li>AIX supports newest hardware offerings such as 10 gig ethernet adapters, and 8 gig fibre channel adapters. </li></ul><ul><li>AIX is compliant with System V Unix system standards. </li></ul><ul><li>AIX provides advanced system security features, at many levels. </li></ul><ul><li>AIX has advanced diagnostic applications for hardware and software errors. </li></ul>
  10. 10. AIX Overview <ul><li>AIX has a lot in common with other proprietary Unix operating systems. Proprietary Unix operating systems typically differ with sysadmin tools, and virtualization technology. </li></ul><ul><li>AIX comes with a journaled filesystem – JFS2. The older version JFS is still shipped with AIX. JFS2 will allow multi terabyte files, and multi petabyte filesystems. </li></ul><ul><li>AIX provides integrated security auditing features, allowing you to audit system activity at a very granular level. </li></ul><ul><li>AIX provides an integrated accounting system, so that you can account for user, and application usage of resources on the system. This is especially useful in chargeback environments. </li></ul>
  11. 11. AIX Overview <ul><li>By default AIX comes with a software component known as WorkLoad Manager – WLM. This software allows you to logically divide a single AIX operating system into multiple classes by resources for applications and users to run it. </li></ul><ul><li>PowerHA, formerly known as HACMP, provides high availability clustering for AIX systems. This provides automated failover and fallback configurations. This product does not come with AIX by default. You must purchase a separate software license from IBM. </li></ul><ul><li>By default AIX comes with a system monitoring tool – RMC, Resource Monitoring and Control, which can monitor and react to certain AIX events, and then execute a certain action based on that event, such as automatically email the sysadmin, or some other system based action. </li></ul>
  12. 12. AIX Overview <ul><li>AIX comes with a backup utility known as mksysb – MaKe SYStem Backup. This utility will allow you to create a bootable system backup which you will use for system disaster recovery scenarios. </li></ul><ul><li>AIX comes with another backup utility, called backup. This command allows you to backup at a file, and/or directory level. The counterpart to this command is the restore command, which allows you to restore the files and/or directories you backed up with the backup command. </li></ul><ul><li>AIX comes with it’s own software management subsystem, for software. It can manage software inventory for both LPP format software, and RPM format software. </li></ul>
  13. 13. AIX Overview <ul><li>Starting in AIX version 5.1, Linux affinity is integrated into the operating system. </li></ul><ul><li>Media comes with AIX called, Linux Applications Toolbox for AIX. Contents of media are also available for free download via the internet from IBM. This media contains IBM certified Linux applications compiled to run on POWER systems. </li></ul><ul><li>The rpm command, which installs Linux software is included </li></ul><ul><li>by default in AIX. </li></ul><ul><li>The source code to these applications are also available. </li></ul><ul><li>Starting in AIX version 5.1, a lot of AIX now contains architecture, </li></ul><ul><li>which is most commonly found on Linux based systems. </li></ul>
  14. 14. AIX overview <ul><li>AIX version release history: </li></ul><ul><li>1986 – AIX version 1.0 – 2.0 </li></ul><ul><li>1989 – AIX version 1.1 for the PS/2 PC </li></ul><ul><li>1989 – AIX version 3.0 for RISC/6000 line of servers </li></ul><ul><li>1992 – AIX version 3.2 for RISC/6000 line of servers </li></ul><ul><li>1994 – AIX version 4.0 for RISC/6000 line of servers </li></ul><ul><li>1995 – AIX version 4.1 for RISC/6000 line of servers </li></ul><ul><li>1996 – AIX version 4.2 for RISC/6000 line of servers </li></ul><ul><li>1997 – AIX version 4.3 for RISC/6000 line of servers </li></ul><ul><li>1999 – AIX version 4.3.3 for RISC/6000 line of servers </li></ul><ul><li>2001 – AIX version 5.1 for RISC/6000 and POWER servers </li></ul><ul><li>2002 – AIX version 5.2 for POWER servers </li></ul><ul><li>2004 – AIX version 5.3 for POWER servers </li></ul><ul><li>2007 – AIX version 6.1 for POWER servers </li></ul><ul><li>2011 – AIX version 7.1. – TENTATIVE. </li></ul>
  15. 15. AIX overview
  16. 16. A word on Linux <ul><li>Linux is a clone of the UNIX operating system. It is technically not considered UNIX. </li></ul><ul><li>The first Linux kernel was developed by Linus Trorvalds in 1991. </li></ul><ul><li>Linux’s origins are found in the MINX operating system project which was a minimal Unix like operating system used for educational purposes, etc. It was released in 1987. Linux actually started because Linus was frustrated with the licensing of the MINIX operating system. </li></ul><ul><li>There are many different distributions of the Linux operating system, aimed for different things, the two most used in the business computing world however are: Novell Suse Linux and Red Hat Linux used mostly in Europe and in the U.S. respectively. </li></ul>
  17. 17. IBM POWER Servers
  18. 18. IBM POWER line of servers p6 – 520 Express
  19. 19. IBM POWER line of servers p6 – 550 Express
  20. 20. IBM POWER line of servers p6 – 560 Express
  21. 21. IBM POWER line of servers p6 - 570
  22. 22. IBM POWER line of servers p6 – 595
  23. 23. IBM POWER Servers
  24. 24. IBM POWER line of servers p7 – 710 Express <ul><li>Low end class </li></ul><ul><li>Up to 64 GB of memory/RAM </li></ul><ul><li>Up to 1 X 3.7 Gigahertz processors </li></ul><ul><li>6 core POWER7 processors </li></ul><ul><li>HMC and PowerVM capabilities </li></ul><ul><li>Other processor options: </li></ul><ul><li>1 POWER7 3.0 GHz processors – 4 cores </li></ul><ul><li>1 POWER7 3.55 GHz processors – 8 cores </li></ul>
  25. 25. IBM POWER line of servers p7 – 720 Express <ul><li>Low end class </li></ul><ul><li>Up to 128 GB of memory/RAM </li></ul><ul><li>Up to 1 X 3.0 Gigahertz processors </li></ul><ul><li>8 core POWER7 processors </li></ul><ul><li>HMC and PowerVM capabilities </li></ul><ul><li>Other processor options: </li></ul><ul><li>1 POWER7 3.0 GHz processors – 4 cores </li></ul><ul><li>1 POWER7 3.0 GHz processors – 6 cores </li></ul>
  26. 26. IBM POWER line of servers p7 – 730 Express <ul><li>Low end class </li></ul><ul><li>Up to 128 GB of memory/RAM </li></ul><ul><li>Up to 2 X 3.7 Gigahertz processors </li></ul><ul><li>8 core POWER7 processors </li></ul><ul><li>HMC and PowerVM capabilities </li></ul><ul><li>Other processor options: </li></ul><ul><li>2 POWER7 3.0 GHz processors – 8 cores </li></ul><ul><li>2 POWER7 3.7 GHz processors – 12 cores </li></ul><ul><li>2 POWER7 3.55 GHz processors – 16 cores </li></ul>
  27. 27. IBM POWER line of servers p7 – 740 Express <ul><li>Low end class </li></ul><ul><li>Up to 256 GB of memory/RAM </li></ul><ul><li>Up to 2 X 3.7 Gigahertz processors </li></ul><ul><li>8 core POWER7 processors </li></ul><ul><li>HMC and PowerVM capabilities </li></ul><ul><li>Other processor options: </li></ul><ul><li>2 POWER7 3.3 GHz processors – 4 cores </li></ul><ul><li>2 POWER7 3.3 GHz processors – 8 cores </li></ul><ul><li>2 POWER7 3.7 GHz processors – 4 cores </li></ul><ul><li>2 POWER7 3.7 GHz processors – 6 cores </li></ul><ul><li>2 POWER7 3.7 GHz processors – 12 cores </li></ul><ul><li>2 POWER7 3.55 GHz processors – 8 cores </li></ul><ul><li>2 POWER7 3.55 GHz processors – 16 cores </li></ul>
  28. 28. IBM POWER line of servers p7 – 750 Express <ul><li>Low end class </li></ul><ul><li>Up to 512 GB of memory/RAM </li></ul><ul><li>Up to 4 X 3.55 Gigahertz processors </li></ul><ul><li>8 core POWER7 processors </li></ul><ul><li>HMC and PowerVM capabilities </li></ul><ul><li>Other processor options: </li></ul><ul><li>4 POWER7 3.0 GHz processors – 8 cores </li></ul><ul><li>4 POWER7 3.3 GHz processors – 6 cores </li></ul><ul><li>4 POWER7 3.3 GHz processors – 8 cores </li></ul>
  29. 29. IBM POWER line of servers p7 - 770 <ul><li>Midrange class </li></ul><ul><li>Up to 4 building blocks </li></ul><ul><li>Up to 512 GB of memory/RAM </li></ul><ul><li>Up to 2 X 3.5 Gigahertz processors </li></ul><ul><li>6 core POWER7 processors </li></ul><ul><li>HMC and PowerVM capabilities </li></ul><ul><li>Other processor option: </li></ul><ul><li>2 POWER7 3.1 GHz processors </li></ul><ul><li>8 cores </li></ul>
  30. 30. IBM POWER line of servers p7 - 780 <ul><li>Midrange class </li></ul><ul><li>Mainframe inspired </li></ul><ul><li>Up to 512 GB of memory/RAM </li></ul><ul><li>Up to 2 X 4.1 Gigahertz processors </li></ul><ul><li>4 core POWER7 processors </li></ul><ul><li>HMC and PowerVM capabilities </li></ul><ul><li>Other processor option: </li></ul><ul><li>2 POWER7 3.8 GHz processors </li></ul><ul><li>8 cores </li></ul>
  31. 31. IBM POWER line of servers p7 - 795 <ul><li>High end/Enterprise class </li></ul><ul><li>Mainframe inspired </li></ul><ul><li>Most powerful UNIX server </li></ul><ul><li>Up to 8 TB of memory/RAM </li></ul><ul><li>Up to 32 X 4 Gigahertz processors </li></ul><ul><li>8 core POWER7 processors – (Total 256 cores) </li></ul><ul><li>HMC and PowerVM capabilities </li></ul><ul><li>Turbo option: </li></ul><ul><li>128 POWER7 4.25 GHz processors </li></ul>
  32. 32. IBM POWER Blade Servers
  33. 33. IBM POWER line of servers p6 – JS12, JS22, JS23, and JS43 J43
  34. 34. IBM POWER Blade Servers
  35. 35. IBM POWER line of servers p7 – PS700, PS701, and PS702 PS700 – Single wide blade. Up to 64 GB of memory/RAM Up to 1 X 3.0 Gigahertz processors 4 core POWER7 processors PowerVM capabilities PS701 – Single wide blade. Up to 128 GB of memory/RAM Up to 1 X 3.0 Gigahertz processors 8 core POWER7 processors PowerVM capabilities PS702 – Double wide blade. Up to 256 GB of memory/RAM Up to 2 X 3.0 Gigahertz processors 16 core POWER7 processors PowerVM capabilities
  36. 36. IBM POWER line of servers p7 – Bladecenters
  37. 37. Throughout IBM AIX system history
  38. 38. Throughout IBM AIX system history <ul><li>RT – AIX version 1.0 – 2.0 only. </li></ul>
  39. 39. Throughout IBM AIX system history <ul><li>320 system </li></ul>
  40. 40. Throughout IBM AIX system history <ul><li>590 </li></ul>
  41. 41. Throughout IBM AIX system history <ul><li>RS/6000 43P </li></ul>
  42. 42. Throughout IBM AIX system history <ul><li>Another 43P </li></ul>
  43. 43. Throughout IBM AIX system history <ul><li>F50 </li></ul>
  44. 44. Throughout IBM AIX system history <ul><li>42T </li></ul>
  45. 45. Throughout IBM AIX system history <ul><li>RS/6000 B50 </li></ul>
  46. 46. Throughout IBM AIX system history <ul><li>H80 </li></ul>
  47. 47. Throughout IBM AIX system history <ul><li>S80 </li></ul>
  48. 48. Throughout IBM AIX system history <ul><li>RS/6000 SP </li></ul>
  49. 49. Throughout IBM AIX system history <ul><li>More RS/6000 SPs </li></ul>
  50. 50. Our Lab <ul><li>The configuration of the ATS lab, The Innovation Center, we’ll be using in this week’s class is as follows. </li></ul><ul><li>Two POWER7 blades: PS700. They have the following specs: </li></ul><ul><li>- 4 IBM Power 7 processors. </li></ul><ul><li>- 32 Gigabytes of real memory/RAM. </li></ul><ul><li>2 X 300 Gigabyte internal hard disks. </li></ul>
  51. 51. Our Lab <ul><li>Each blade has 13 AIX LPARS created on them. AIX version 6.1 TL 6 SP 2. </li></ul><ul><li>We will be using 5 LPARs from the first blade, Blade # 13: </li></ul><ul><li>Gvicaix01 </li></ul><ul><li>Gvicaix02 </li></ul><ul><li>Gvicaix03 </li></ul><ul><li>Gvicaix04 </li></ul><ul><li>Gvicaix05 </li></ul>
  52. 52. Our Lab <ul><li>We will be using 2 LPARs from the second blade, Blade # 14: </li></ul><ul><li>Gvicaix06 </li></ul><ul><li>Gvicaix07 </li></ul><ul><li>- The login name is root, and there is currently no password set. </li></ul><ul><li>The Instructor will now assign them. Every student will be assigned their own LPAR. </li></ul>
  53. 53. Our Lab <ul><li>Our lab network is a standard, Class C, flat network, on subnet 192.168.240. </li></ul><ul><li>The IP addresses of the LPARS are listed below: </li></ul><ul><li>Gvicaix01 – 192.168.240.123 </li></ul><ul><li>Gvicaix02 – 192.168.240.124 </li></ul><ul><li>Gvicaix03 – 192.168.240.125 </li></ul><ul><li>Gvicaix04 – 192.168.240.126 </li></ul><ul><li>Gvicaix05 – 192.168.240.127 </li></ul><ul><li>Gvicaix06 – 192.168.240.135 </li></ul><ul><li>Gvicaix07 – 192.168.240.136 </li></ul>
  54. 54. Our Lab <ul><li>On your desktop you should have an application called, Putty. Go ahead and double-click on it: </li></ul>
  55. 55. Our Lab <ul><li>Once the application starts type in the IP address of your assigned LPAR: </li></ul><ul><li>Be sure that “telnet” is selected, and then click “Open”. </li></ul>
  56. 56. Our Lab <ul><li>The Integrated Virtualization Manager, IVM, is a web interface which allows you to manage a physical system which has virtual AIX operating systems running on it. In this class we will use this interface to gain console access to our LPARS. </li></ul><ul><li>Open the Microsoft Internet Explorer to the following address: </li></ul><ul><li>http://192.168.240.101 </li></ul><ul><li>(For students on LPARS: Gvicaix01, thru Gvicaix05) </li></ul><ul><li>Or </li></ul><ul><li>http://192.168.240.102 </li></ul><ul><li>(For students on LPARS: Gvicaix06, and Gvicaix07) </li></ul><ul><li>Login for both: padmin </li></ul><ul><li>Password for both: ibmibm </li></ul><ul><li>After you open it minimize the window, you will need it in later labs. </li></ul>
  57. 57. Our Lab
  58. 58. Our Lab
  59. 59. Installing the AIX Operating System
  60. 60. Installing the AIX Operating System <ul><li>The AIX operating system is shipped from IBM traditionally on 8 CDs, or 2 DVDs. </li></ul><ul><li>When you install the operating system, you are installing what’s referred to as the BOS – Base Operating System. </li></ul><ul><li>On most systems the operating system installation will take about ~45 minutes to ~1 hour to complete. </li></ul><ul><li>The AIX Base Operating System requires ~512 MB of memory/RAM, and ~5 GB of disk space. </li></ul><ul><li>NOTE: Installation of the operating system will not be done in class as a lab, in the interest of time. </li></ul>
  61. 61. Installing the AIX Operating System <ul><li>There are three types of AIX BOS installations. </li></ul><ul><li>New and Complete Overwrite </li></ul><ul><li>Migration </li></ul><ul><li>Preservation </li></ul>
  62. 62. Installing the AIX Operating System <ul><li>BOS installations can be accomplished with the following methods. </li></ul><ul><li>New install from the DVD media from IBM. </li></ul><ul><li>Install over the network with NIM – Network Installation Manager. </li></ul><ul><li>Recovery of a bootable system backup – (Tape, CD, DVD, or NIM). </li></ul><ul><li>From an ISO file – VIO. </li></ul><ul><li>Alt_disk_install method/cloning. </li></ul>
  63. 63. Installing the AIX Operating System
  64. 64. Installing the AIX Operating System
  65. 65. Installing the AIX Operating System
  66. 66. Installing the AIX Operating System
  67. 67. Installing the AIX Operating System
  68. 68. Installing the AIX Operating System
  69. 69. Installing the AIX Operating System
  70. 70. Installing the AIX Operating System
  71. 71. Installing the AIX Operating System
  72. 72. Installing the AIX Operating System
  73. 73. Installing the AIX Operating System
  74. 74. Installing the AIX Operating System
  75. 75. Logging into the System
  76. 76. High level Components of a Unix system
  77. 77. AIX – Logging into the system
  78. 78. AIX – Logging into the system <ul><li>After the system boots, or anytime you connect to the system you will be presented with a login screen which is known as the herald message. This is prompting you for a login name which will identify you as a valid user to the system. </li></ul><ul><li>AIX Version 6 </li></ul><ul><li>Copyright IBM Corporation, 1982, 2009. </li></ul><ul><li>login: </li></ul><ul><li>By AIX BOS installation default the only user which is available to log into is the user “root”. Root is the administrator of the system. It’s the most powerful user-id on the system. </li></ul><ul><li>Note: A synonym for root is Super user. </li></ul>
  79. 79. AIX – Logging into the system <ul><li>By installation default, when you login as the root user, you are not prompted for a password. The password is not set for the root user by default. </li></ul><ul><li>AIX Version 6 </li></ul><ul><li>Copyright IBM Corporation, 1982, 2009. </li></ul><ul><li>login: root </li></ul><ul><li>********************************************************************************************* </li></ul><ul><li>* * </li></ul><ul><li>* * </li></ul><ul><li>* Welcome to AIX Version 6.1! * </li></ul><ul><li>* * </li></ul><ul><li>* * </li></ul><ul><li>* Please see the README file in /usr/lpp/bos for information pertinent to * </li></ul><ul><li>* this release of the AIX Operating System. * </li></ul><ul><li>* * </li></ul><ul><li>* * </li></ul><ul><li>********************************************************************************************** </li></ul><ul><li># </li></ul>
  80. 80. AIX – Logging into the system <ul><li>After successfully identifying yourself to the system, and logging in you will be presented with a message known as the Message Of The Day (MOTD). After that message you will see the symbol #, pound sign. This is the Korn shell prompt which indicates that the system is now ready for you to communicate with it. It’s waiting for a command. The #, pound sign, is the prompt for the root user. </li></ul><ul><li>AIX Version 6 </li></ul><ul><li>Copyright IBM Corporation, 1982, 2009. </li></ul><ul><li>login: root </li></ul><ul><li>********************************************************************************************** </li></ul><ul><li>* * </li></ul><ul><li>* * </li></ul><ul><li>* Welcome to AIX Version 6.1! * </li></ul><ul><li>* * </li></ul><ul><li>* * </li></ul><ul><li>* Please see the README file in /usr/lpp/bos for information pertinent to * </li></ul><ul><li>* this release of the AIX Operating System. * </li></ul><ul><li>* * </li></ul><ul><li>* * </li></ul><ul><li>********************************************************************************************** </li></ul><ul><li># </li></ul>
  81. 81. AIX – Logging into the system <ul><li>A shell is how the user/you communicates with the operating system. Think of it as a text version of the Windows Desktop. There are many shells available for Unix systems. They are listed below: </li></ul><ul><li>Ksh = Korn Shell (Default shell for AIX). </li></ul><ul><li>Bsh = Bourne Shell </li></ul><ul><li>Bash = Bourne Again Shell </li></ul><ul><li>Csh = C-shell </li></ul><ul><li>Tsh = Trusted shell </li></ul><ul><li>ETC… </li></ul><ul><li>The Korn shell is the default in AIX. When you install the system, and create regular users, they will be placed into the Korn shell in their home directory automatically when they log into the system. </li></ul>
  82. 82. AIX – Logging into the system <ul><li>A user communicates with a Unix system with commands, which are submitted to the system via a shell. A command executes within a shell environment. </li></ul><ul><li>A command is a program/executable which is used to accomplish tasks on a Unix system. </li></ul><ul><li>A command obeys rules known as syntax, how the command is to be entered. </li></ul><ul><li>A command consists of the following components: </li></ul><ul><li>Program </li></ul><ul><li>Options </li></ul><ul><li>Arguments </li></ul>
  83. 83. AIX – Logging into the system <ul><li>Ex of a command: </li></ul><ul><li># ls –l /home </li></ul><ul><li>ls = Command/program </li></ul><ul><li>-l = Option </li></ul><ul><li>/home = Argument </li></ul>
  84. 84. AIX – Logging into the system <ul><li>The id command will display the user you are logged into the system as. Notice how root is UID, User ID: 0. This is the numeric user-id that the system internally uses to identify you. UID 0, means the root user, or a user with root privilege. </li></ul><ul><li># id </li></ul><ul><li>uid=0(root) gid=0(system) groups=2(bin),3(sys),7(security),8(cron),10(audit),11(lp) </li></ul><ul><li># </li></ul><ul><li>To set the password of the root user, or any user for that matter use the passwd command. </li></ul><ul><li># passwd </li></ul><ul><li>Changing password for &quot;root&quot; </li></ul><ul><li>root's New password: </li></ul><ul><li>Enter the new password again: </li></ul><ul><li># </li></ul><ul><li>The password will not be visible as you are entering it. You will have to confirm it, once it’s typed in. The system does this to prevent typos, and for security reasons. </li></ul>
  85. 85. AIX – Logging into the system <ul><li>To exit the Korn shell, type in the command “exit”. </li></ul><ul><li>Once you do that you will be disconnected from the system. </li></ul><ul><li># exit </li></ul><ul><li>Connection closed – (Putty closes). </li></ul><ul><li>Open another connection to the system, and login as the root user again: </li></ul><ul><li>AIX Version 6 </li></ul><ul><li>Copyright IBM Corporation, 1982, 2007. </li></ul><ul><li>login: root </li></ul><ul><li>root's Password: </li></ul><ul><li>*MOTD IS DISPLAYED, THEN KORN SHELL PROMPT* </li></ul><ul><li>Notice that the system now prompts you for a password because you set it for the root user. </li></ul>
  86. 86. AIX – Logging into the system <ul><li>Notice how the password was not visible when you entered it. </li></ul><ul><li>This is done for security reasons. </li></ul><ul><li>If you enter the wrong password, AIX will not tell you which one, user id, or password was invalid, it will tell you that one of them is incorrect. This is done for security reasons. </li></ul><ul><li>AIX Version 6 </li></ul><ul><li>Copyright IBM Corporation, 1982, 2007. </li></ul><ul><li>login: root </li></ul><ul><li>root's Password: </li></ul><ul><li>You entered an invalid login name or password. </li></ul><ul><li>login: </li></ul>
  87. 87. Interacting with Unix
  88. 88. Interacting with Unix <ul><li>It’s very imperative to understand that Unix is case sensitive. That means that just about everything is lower case. </li></ul><ul><li># id </li></ul><ul><li>uid=0(root) gid=0(system) groups=2(bin),3(sys),7(security),8(cron),10(audit),11(lp) </li></ul><ul><li>Not the same as typing: </li></ul><ul><li># ID </li></ul><ul><li>ksh: ID: not found </li></ul><ul><li># </li></ul>
  89. 89. Interacting with Unix <ul><li>You can see the current month’s calendar with the following command: </li></ul><ul><li># cal </li></ul><ul><li>September 2009 </li></ul><ul><li>Sun Mon Tue Wed Thu Fri Sat </li></ul><ul><li>1 2 3 4 5 </li></ul><ul><li>6 7 8 9 10 11 12 </li></ul><ul><li>13 14 15 16 17 18 19 </li></ul><ul><li>20 21 22 23 24 25 26 </li></ul><ul><li>27 28 29 30 </li></ul><ul><li># </li></ul>
  90. 90. Interacting with Unix <ul><li>You can see the whole year calendar by feeding the command the year. Note, doesn’t have to be the current year. </li></ul><ul><li># cal 2009 </li></ul><ul><li>2009 </li></ul><ul><li>January February </li></ul><ul><li>Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat </li></ul><ul><li>1 2 3 1 2 3 4 5 6 7 </li></ul><ul><li>4 5 6 7 8 9 10 8 9 10 11 12 13 14 </li></ul><ul><li>11 12 13 14 15 16 17 15 16 17 18 19 20 21 </li></ul><ul><li>18 19 20 21 22 23 24 22 23 24 25 26 27 28 </li></ul><ul><li>25 26 27 28 29 30 31 </li></ul><ul><li>March April </li></ul><ul><li>Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat </li></ul><ul><li>1 2 3 4 5 6 7 1 2 3 4 </li></ul><ul><li>8 9 10 11 12 13 14 5 6 7 8 9 10 11 </li></ul><ul><li>15 16 17 18 19 20 21 12 13 14 15 16 17 18 </li></ul><ul><li>22 23 24 25 26 27 28 19 20 21 22 23 24 25 </li></ul><ul><li>30 31 26 27 28 29 30 </li></ul>
  91. 91. Interacting with Unix <ul><li>You can also specify a specific month of a year. </li></ul><ul><li># cal 8 2010 </li></ul><ul><li>August 2010 </li></ul><ul><li>Sun Mon Tue Wed Thu Fri Sat </li></ul><ul><li>1 2 3 4 5 6 7 </li></ul><ul><li>8 9 10 11 12 13 14 </li></ul><ul><li>15 16 17 18 19 20 21 </li></ul><ul><li>22 23 24 25 26 27 28 </li></ul><ul><li>29 30 31 </li></ul><ul><li># cal 10 2010 </li></ul><ul><li>October 2010 </li></ul><ul><li>Sun Mon Tue Wed Thu Fri Sat </li></ul><ul><li>1 2 </li></ul><ul><li>3 4 5 6 7 8 9 </li></ul><ul><li>10 11 12 13 14 15 16 </li></ul><ul><li>17 18 19 20 21 22 23 </li></ul><ul><li>24 25 26 27 28 29 30 </li></ul><ul><li>31 </li></ul>
  92. 92. Interacting with Unix <ul><li>Let’s say you wanted to know the current date, and time. Use the Unix date command </li></ul><ul><li># date </li></ul><ul><li>Fri Sep 4 15:57:18 EDT 2009 </li></ul><ul><li># </li></ul><ul><li>Even though you just typed in the date command, you will also get the current time as well. Note that time is military by defaut in Unix. </li></ul>
  93. 93. Interacting with Unix <ul><li>Unix also has a built in calculator. It’s called bc for Basic Calculator. </li></ul><ul><li># bc </li></ul><ul><li>4 + 2 </li></ul><ul><li>6 </li></ul><ul><li>5 * 7 </li></ul><ul><li>35 </li></ul><ul><li>7 - 2 </li></ul><ul><li>5 </li></ul><ul><li>100 / 50 </li></ul><ul><li>2 </li></ul><ul><li>quit </li></ul><ul><li># </li></ul><ul><li>Note, even though bc stands for basic calculator, it does have the capability of doing more complex calculations other than just arithmetic, as shown above. </li></ul>
  94. 94. Interacting with Unix <ul><li>Unix comes with a text editor called vi. This stands for VIsual editor. </li></ul><ul><li>You can use this editor to create new text files, or edit existing ones. </li></ul><ul><li>Note: There are other text editors which are available in Unix such as ed, emacs, etc. However, vi is more widely used. </li></ul><ul><li># vi /file </li></ul><ul><li>~ </li></ul><ul><li>~ </li></ul><ul><li>~ </li></ul><ul><li>~ </li></ul><ul><li>~ </li></ul><ul><li>~ </li></ul><ul><li>~ </li></ul><ul><li>~ </li></ul><ul><li>~ </li></ul><ul><li>~ </li></ul><ul><li>“ /file” [New file] </li></ul><ul><li>1. Once in the editor type in a to enter input mode. </li></ul><ul><li>2. Start entering text, ex – “This is the best Unix class I have ever been to. <ENTER> <ENTER> I would recommend it to anyone.” </li></ul><ul><li>3. Now hit the Escape key to get out of input mode, and to enter command mode. </li></ul><ul><li>4. Type in the colon, and type in wq – ( w = write(save) q = quit vi ). </li></ul>
  95. 95. Interacting with Unix <ul><li>Short VI reference – “Moving around” </li></ul><ul><li>ESC + x = Deletes a single character </li></ul><ul><li>ESC + j = Move down a line. </li></ul><ul><li>ESC + k = Move up a line. </li></ul><ul><li>ESC + l = Move right one space. </li></ul><ul><li>ESC + h = Move left one space. </li></ul><ul><li>Note: On most terminals today, you can move around with the normal keyboard arrows. </li></ul>
  96. 96. Interacting with Unix <ul><li>To view the contents of the file you just created with the vi text editor, or any file on the system for that matter, use the cat command, which is short for ConcATenate. This means concatenate the bytes on disk. </li></ul><ul><li># cat /file </li></ul><ul><li>This is the best Unix class I have ever been to. </li></ul><ul><li>I would recommend it to anyone. </li></ul><ul><li># </li></ul>
  97. 97. Interacting with Unix <ul><li>You can view the first N lines of a file with the head command. </li></ul><ul><li># head -1 file </li></ul><ul><li>This is the best Unix class I have ever been to. </li></ul><ul><li># </li></ul><ul><li>By default the head command will show you the first ten lines of a file. </li></ul>
  98. 98. Interacting with Unix <ul><li>You can view the last N lines of a file with the tail command. </li></ul><ul><li># tail -2 file </li></ul><ul><li>I would recommend it to anyone. </li></ul><ul><li>$ </li></ul><ul><li>By default the tail command will show you the last ten lines of a file. </li></ul><ul><li>Note: There is also a tail –f, which provides streaming output of the last line of a file. </li></ul>
  99. 99. Interacting with Unix <ul><li>You can list the contents of a file with all of the lines in the file numbered with the cat command with the –n argument. </li></ul><ul><li># cat -n /file </li></ul><ul><li>1 This is the best Unix class I have ever been to. </li></ul><ul><li>2 </li></ul><ul><li>3 I would recommend it to anyone. </li></ul><ul><li># </li></ul>
  100. 100. Interacting with Unix <ul><li>If you wanted to count the number of lines, words, or characters of a file, then you can use the wc command, which stands for Word Count, but it counts the abovementioned entities of a file as well. </li></ul><ul><li># cat /file </li></ul><ul><li>This is the best Unix class I have ever been to. </li></ul><ul><li>I would recommend it to anyone. </li></ul><ul><li># wc -c /file </li></ul><ul><li>82 /file </li></ul><ul><li># wc -w /file </li></ul><ul><li>17 /file </li></ul><ul><li># wc -l /file </li></ul><ul><li>3 /file </li></ul><ul><li># </li></ul>
  101. 101. Interacting with Unix <ul><li>You can use the cut command to display certain portions of a file, or other output out. </li></ul><ul><li># cat /file </li></ul><ul><li>This is the best Unix class I have ever been to. </li></ul><ul><li>I would recommend it to anyone. </li></ul><ul><li># cut -c1-3 file </li></ul><ul><li>Thi </li></ul><ul><li>I w </li></ul><ul><li># cut -c1,5 file </li></ul><ul><li>T </li></ul><ul><li>Iu </li></ul><ul><li># </li></ul>
  102. 102. Interacting with Unix <ul><li>The command grep, will search for a specific string in a file, or other output, and will display the line it found that string on. </li></ul><ul><li># cat /file </li></ul><ul><li>This is the best Unix class I have ever been to. </li></ul><ul><li>I would recommend it to anyone. </li></ul><ul><li># </li></ul><ul><li># grep would /file </li></ul><ul><li>I would recommend it to anyone. </li></ul><ul><li># </li></ul><ul><li># grep is /file </li></ul><ul><li>This is the best Unix class I have ever been to. </li></ul><ul><li># </li></ul>
  103. 103. Interacting with Unix <ul><li>The banner command can be very useful. It’s a way of displaying strings, which are imperative to your users. A good example of this may be the word PRODUCTION. You would definitely want your users to know they are on a production system </li></ul><ul><li># banner production </li></ul><ul><li>##### ##### #### ##### # # #### ##### # #### # # </li></ul><ul><li># # # # # # # # # # # # # # # # ## # </li></ul><ul><li># # # # # # # # # # # # # # # # # # </li></ul><ul><li>##### ##### # # # # # # # # # # # # # # </li></ul><ul><li># # # # # # # # # # # # # # # # ## </li></ul><ul><li># # # #### ##### #### #### # # #### # # </li></ul><ul><li># </li></ul>
  104. 104. Interacting with Unix <ul><li>Unix has online help available. This is the equivalent of pressing <F1> on a Windows system. The command is man, which is short for MANual, as in manual pages. </li></ul><ul><li># man id </li></ul><ul><li>Commands Reference, Volume 3, i - m </li></ul><ul><li>id Command </li></ul><ul><li>Purpose </li></ul><ul><li>Displays the system identifications of a specified user. </li></ul><ul><li>Syntax </li></ul><ul><li>id [user] </li></ul><ul><li>id -G [-n ] [User] </li></ul><ul><li>id -g [-n l | [ -n r ] [User] </li></ul><ul><li>id -u [-n l | [ -n r ] [User] </li></ul><ul><li>Description </li></ul><ul><li>The id command writes to standard output a message containing the </li></ul><ul><li>system identifications (ID) for a specified user. The system IDs are </li></ul><ul><li>numbers which identify users and user groups to the system. The id </li></ul><ul><li>command writes the following information, when applicable: </li></ul><ul><li>* User name and real user ID </li></ul><ul><li>… </li></ul>
  105. 105. Interacting with Unix <ul><li>There is a special symbol called a pipe. The symbol is |, the vertical bar. It’s located right above the <ENTER> key, on the standard American computer keyboard. </li></ul><ul><li># date </li></ul><ul><li>Fri Sep 4 20:34:11 EDT 2009 </li></ul><ul><li># cut </li></ul><ul><li>Usage: cut {-b <list> [-n] | -c <list> | -f <list> [-d <char>] [-s]} file ... </li></ul><ul><li># </li></ul><ul><li>Note, the Unix cut command doesn’t do much without this pipe symbol, or feeding a file to it. </li></ul><ul><li>Let’s say you wanted only to display the first three characters of the date command output. You would have to use the cut command to accomplish this. Let’s say you wanted to accomplish this with one command. What you can do is execute the date command, then tie it to the cut command with a Unix pipe. </li></ul><ul><li># date </li></ul><ul><li>Fri Sep 4 20:36:48 EDT 2009 </li></ul><ul><li># date | cut -c1-3 </li></ul><ul><li>Fri </li></ul><ul><li># </li></ul>
  106. 106. Interacting with Unix <ul><li>What happened with the pipe in the previous example, is it took the output of the date command, as it’s input. </li></ul><ul><li>Here are some more examples: </li></ul><ul><li># who </li></ul><ul><li>root pts/0 Sep 4 20:19 (192.168.220.8) </li></ul><ul><li># who | wc -l </li></ul><ul><li>1 </li></ul><ul><li># who | wc -c </li></ul><ul><li>58 </li></ul><ul><li># who | wc -w </li></ul><ul><li>6 </li></ul><ul><li># </li></ul>
  107. 107. Interacting with Unix <ul><li>Let’s say you issued the command: prtconf, the command which lists the hardware configuration of the server , but the output is too long for you to read the entire thing. It scrolls off of the screen too quickly. Unless you can read at the speed of light, this won’t do you much good. </li></ul><ul><li># prtconf </li></ul><ul><li>System Model: IBM,9117-MMA </li></ul><ul><li>Machine Serial Number: 10118F0 </li></ul><ul><li>Processor Type: PowerPC_POWER6 </li></ul><ul><li>Number Of Processors: 8 </li></ul><ul><li>Processor Clock Speed: 3504 MHz </li></ul><ul><li>CPU Type: 64-bit </li></ul><ul><li>Kernel Type: 64-bit </li></ul><ul><li>LPAR Info: 5 gvicaix14 </li></ul><ul><li>Memory Size: 2048 MB </li></ul><ul><li>Good Memory Size: 2048 MB </li></ul><ul><li>Platform Firmware level: Not Available </li></ul><ul><li>Firmware Version: IBM,EM340_041 </li></ul><ul><li>Console Login: enable </li></ul><ul><li>Auto Restart: true </li></ul><ul><li>THE REMAINDER OF THE OUTPUT SCROLLS OFF OF THE SCREEN. </li></ul><ul><li>… </li></ul>
  108. 108. Interacting with Unix <ul><li>There are two what they call pager commands you can use which will preclude long outputs such as this one from scrolling off of the screen before you had a chance to read it. One command is more, and the other command is pg, which is short for PaGer. </li></ul><ul><li># prtconf | more </li></ul><ul><li>System Model: IBM,9117-MMA </li></ul><ul><li>Machine Serial Number: 10118F0 </li></ul><ul><li>Processor Type: PowerPC_POWER6 </li></ul><ul><li>Number Of Processors: 8 </li></ul><ul><li>Processor Clock Speed: 3504 MHz </li></ul><ul><li>CPU Type: 64-bit </li></ul><ul><li>Kernel Type: 64-bit </li></ul><ul><li>LPAR Info: 5 gvicaix14 </li></ul><ul><li>Memory Size: 2048 MB </li></ul><ul><li>Good Memory Size: 2048 MB </li></ul><ul><li>Platform Firmware level: Not Available </li></ul><ul><li>Firmware Version: IBM,EM340_041 </li></ul><ul><li>Console Login: enable </li></ul><ul><li>Auto Restart: true </li></ul><ul><li>Full Core: false </li></ul><ul><li>OUTPUT PAUSES WHEN IT FITS THE SCREEN, UNTIL YOU HIT THE <ENTER> KEY TO CONTINUE TO THE NEXT PAGE. </li></ul>
  109. 109. Interacting with Unix <ul><li># prtconf | pg </li></ul><ul><li>System Model: IBM,9117-MMA </li></ul><ul><li>Machine Serial Number: 10118F0 </li></ul><ul><li>Processor Type: PowerPC_POWER6 </li></ul><ul><li>Number Of Processors: 8 </li></ul><ul><li>Processor Clock Speed: 3504 MHz </li></ul><ul><li>CPU Type: 64-bit </li></ul><ul><li>Kernel Type: 64-bit </li></ul><ul><li>LPAR Info: 5 gvicaix14 </li></ul><ul><li>Memory Size: 2048 MB </li></ul><ul><li>Good Memory Size: 2048 MB </li></ul><ul><li>Platform Firmware level: Not Available </li></ul><ul><li>Firmware Version: IBM,EM340_041 </li></ul><ul><li>Console Login: enable </li></ul><ul><li>Auto Restart: true </li></ul><ul><li>Full Core: false </li></ul><ul><li>Network Information </li></ul><ul><li>Host Name: gvicaix14 </li></ul><ul><li>IP Address: 192.168.240.137 </li></ul><ul><li>Sub Netmask: 255.255.255.0 </li></ul><ul><li>Gateway: 192.168.240.1 </li></ul><ul><li>Name Server: </li></ul><ul><li>Domain Name: </li></ul><ul><li>If you use a +, or a – here it will allow you to move forward, or back by one page respectively. </li></ul>
  110. 110. Interacting with Unix <ul><li>Variables are used to store other values. They are most useful in programming languages. </li></ul><ul><li># export FNAME=justin </li></ul><ul><li># echo $FNAME </li></ul><ul><li>justin </li></ul><ul><li># </li></ul><ul><li>Note, variables are not discussed in depth in this course. They would be discussed in more detail in a Unix shell scripting/programming course. </li></ul>
  111. 111. Interacting with Unix <ul><li>There are some pre-defined variables which come set with the shell. </li></ul><ul><li>These are sometimes referred to as system variables. </li></ul><ul><li># set </li></ul><ul><li>AUTHSTATE=compat </li></ul><ul><li>EDITOR=/usr/bin/vi </li></ul><ul><li>ERRNO=0 </li></ul><ul><li>FCEDIT=/usr/bin/ed </li></ul><ul><li>FNAME=justin </li></ul><ul><li>HOME=/ </li></ul><ul><li>IFS=' </li></ul><ul><li>' </li></ul><ul><li>LANG=C </li></ul><ul><li>LC__FASTMSG=true </li></ul><ul><li>LINENO=1 </li></ul><ul><li>LOCPATH=/usr/lib/nls/loc </li></ul><ul><li>LOGIN=root </li></ul><ul><li>LOGNAME=root </li></ul><ul><li>MAIL=/usr/spool/mail/root </li></ul><ul><li>MAILCHECK=600 </li></ul><ul><li>MAILMSG='[YOU HAVE NEW MAIL]' </li></ul><ul><li>NLSPATH=/usr/lib/nls/msg/%L/%N:/usr/lib/nls/msg/%L/%N.cat </li></ul><ul><li>ODMDIR=/etc/objrepos </li></ul><ul><li>OPTIND=1 </li></ul><ul><li>PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/usr/java14/jre/bin:/us </li></ul><ul><li>r/java14/bin </li></ul><ul><li>PPID=307422 </li></ul><ul><li>PS1='# ' </li></ul><ul><li>PS2='> ' </li></ul><ul><li>PS3='#? ' </li></ul>
  112. 112. Interacting with Unix <ul><li>One thing you can do with the pre-defined shell variables is change the korn shell root prompt, from the default #, to unix>. </li></ul><ul><li># echo $PS1 </li></ul><ul><li># </li></ul><ul><li># export PS1=&quot;unix> &quot; </li></ul><ul><li>unix> </li></ul><ul><li>unix> </li></ul><ul><li>unix> </li></ul><ul><li>unix> </li></ul><ul><li>Log out of the system via the exit command, and then login as root again, by opening another Putty session. You will notice that the prompt reset itself back to what it was originally. This behaivor is discussed with more detail in the User Management section. </li></ul>
  113. 113. Navigating around the system
  114. 114. AIX – Navigating around the system <ul><li>UNIX/AIX has a filing system which it uses to organize the data which is stored on the system’s HDD. This organized system is known as a file tree hierarchy. </li></ul><ul><li>Files are used to store data/information. Files can either have human readable text in them, like an email message, or it can have machine readable binary code, like a compiled program/executable. </li></ul><ul><li>Files are kept in directories. Directories are a way of organizing files. Think of directories as filing cabinets, for your files. Directories are equivalent to folders in the Windows world. </li></ul><ul><li>Directories can contain directories as well as files. The directories which reside in another directory is called the sub-directory. Files are a collection of bytes logically grouped together and stored in an object – a file. </li></ul>
  115. 115. AIX - Navigating around the system <ul><li>Directory structure example </li></ul>
  116. 116. AIX – Navigating around the system <ul><li>Type in the command: “pwd” </li></ul><ul><li># pwd </li></ul><ul><li>/ </li></ul><ul><li># </li></ul><ul><li>This command stands for Present Working Directory. This will tell you where exactly on the directory hierarchy/tree you currently are. Notice how you are in “/”. This means you are at the top of the directory tree. This is root’s home directory. Normally when you create a regular user the default home directory will be /home/user_name. Since this is the root user, /, is the home directory. </li></ul><ul><li>More details on user home directories in the User Management section. </li></ul>
  117. 117. AIX – Navigating around the system <ul><li>To list all of the directories, and files in your current directory type in the “ls” command. This is short for LiSt. </li></ul><ul><li># ls </li></ul><ul><li>.sh_history dev lost+found sbin u </li></ul><ul><li>.vi_history esa lpp smit.log unix </li></ul><ul><li>admin etc mnt smit.script usr </li></ul><ul><li>audit home opt smit.transaction var </li></ul><ul><li>bin image.data pconsole tftpboot </li></ul><ul><li>bosinst.data lib proc tmp </li></ul><ul><li># </li></ul><ul><li>This is the root directory listing which is default after BOS installation. </li></ul>
  118. 118. Navigating around the system <ul><li>To determine which object is a file, and which one is a directory issue the ls command with the –F argument. Note, arguments are characters after the command which instruct the command to behave in a certain way. </li></ul><ul><li># ls -F </li></ul><ul><li>.rhosts audit/ dev/ image.data mksysb/ proc/ smit.transaction unix@ </li></ul><ul><li>.sh_history bin@ esa/ lib@ mnt/ sbin/ tftpboot/ usr/ </li></ul><ul><li>.vi_history bosinst.data etc/ lost+found/ opt/ smit.log tmp/ var/ </li></ul><ul><li>admin/ core home/ lpp/ pconsole/ smit.script u@ </li></ul><ul><li># </li></ul><ul><li>This command added / at the end of the objects which are directories. </li></ul><ul><li>Note, this command also shows the @ symbol at the end of certain directories. This means these are links. Links mean that the directory, or file actually refers to another file, or directory. </li></ul>
  119. 119. Navigating around the system <ul><li>Long listing of a directory. </li></ul><ul><li># ls -l </li></ul><ul><li>total 1368 </li></ul><ul><li>-rw-r--r-- 1 root system 18 Nov 24 21:24 .rhosts </li></ul><ul><li>-rw------- 1 root system 8886 Nov 27 19:46 .sh_history </li></ul><ul><li>-rw------- 1 root system 145 Nov 27 18:29 .vi_history </li></ul><ul><li>drwxr-xr-x 4 root system 256 Nov 24 21:19 admin </li></ul><ul><li>drwxr-x--- 2 root audit 256 Apr 15 2010 audit </li></ul><ul><li>lrwxrwxrwx 1 bin bin 8 Nov 24 21:22 bin -> /usr/bin </li></ul><ul><li>-rw-r--r-- 1 root system 6084 Nov 24 19:51 bosinst.data </li></ul><ul><li>-rw------- 1 root system 7188 Nov 26 12:31 core </li></ul><ul><li>drwxrwxr-x 5 root system 4096 Nov 27 19:32 dev </li></ul><ul><li>drwxr-xr-x 16 esaadmin system 4096 Nov 24 19:37 esa </li></ul><ul><li>drwxr-xr-x 34 root system 12288 Nov 26 13:50 etc </li></ul><ul><li>drwxr-xr-x 5 bin bin 256 Nov 24 21:19 home </li></ul><ul><li>-rw-r--r-- 1 root system 11960 Nov 24 19:51 image.data </li></ul><ul><li>lrwxrwxrwx 1 bin bin 8 Nov 24 21:22 lib -> /usr/lib </li></ul><ul><li>drwx------ 2 root system 256 Nov 24 21:17 lost+found </li></ul><ul><li>drwxr-xr-x 163 bin bin 8192 Nov 24 21:24 lpp </li></ul><ul><li>drwxr-xr-x 3 root system 256 Nov 24 21:17 mksysb </li></ul><ul><li>drwxr-xr-x 2 bin bin 256 Apr 15 2010 mnt </li></ul><ul><li>drwxr-xr-x 17 root system 4096 Nov 24 21:19 opt </li></ul><ul><li>drwxr-xr-x 4 pconsole pconsole 256 Nov 24 17:47 pconsole </li></ul><ul><li>dr-xr-xr-x 1 root system 0 Nov 27 19:46 proc </li></ul><ul><li>drwxr-xr-x 3 bin bin 256 Nov 24 17:43 sbin </li></ul><ul><li>-rw-r--r-- 1 root system 568505 Nov 26 10:01 smit.log </li></ul><ul><li>-rw-r--r-- 1 root system 14094 Nov 26 09:59 smit.script </li></ul><ul><li>-rw-r--r-- 1 root system 17059 Nov 26 09:59 smit.transaction </li></ul><ul><li>drwxrwxr-x 2 root system 256 Nov 24 14:31 tftpboot </li></ul><ul><li>drwxrwxrwt 13 bin bin 4096 Nov 27 19:45 tmp </li></ul><ul><li>lrwxrwxrwx 1 bin bin 5 Nov 24 21:22 u -> /home </li></ul><ul><li>lrwxrwxrwx 1 root system 21 Nov 24 21:22 unix -> /usr/lib/boot/unix_64 </li></ul><ul><li># </li></ul>
  120. 120. Navigating around the system <ul><li>What the objects in / are used for: </li></ul><ul><li>admin – Directory for admin temp files. </li></ul><ul><li>audit – Directory for the user audit logs. If AIX auditing is enabled, which it is not by default. </li></ul><ul><li>bin – Directory where the commands you execute, such as ls, and pwd are kept. </li></ul><ul><li>dev – Directory which represents all devices on a system. Remember everything on a Unix system is a file, and is controlled through a file. </li></ul><ul><li>etc – Directory where configuration files for the operating system, and it’s components live. </li></ul><ul><li>home – Directory where all of the regular user’s default home directories live. </li></ul><ul><li>lib – Directory where the C libraries for the Unix operating system live. </li></ul><ul><li>lost+found – This directory is created by default in every filesystem – IN DEPTH LATER. </li></ul><ul><li>lpp – This directory is where the information about the software installed on the system lives. </li></ul><ul><li>mnt – This is an empty directory which gives you a place to temporarily mount filesystems, if you don’t want to create directories. </li></ul><ul><li>opt – Directory where Linux sofware is installed for AIX. </li></ul><ul><li>pconsole – Directory for some graphic functionality. </li></ul><ul><li>proc – Directory where currently running process information lives. </li></ul><ul><li>sbin – Directory where sysadmin commands live for AIX. </li></ul><ul><li>tftpboot – Directory used to store boot images, for systems who want to boot off of the network. </li></ul><ul><li>tmp – Temporary area for every user to write to. JUNK. </li></ul><ul><li>u – This is for backward compatibility. This is where the user’s home directories used to live. </li></ul><ul><li>unix – This directory is where the system kernel lives. </li></ul><ul><li>usr – This directory is where IBM, and IBM compliant software is installed. It also holds imperative system data. </li></ul><ul><li>var – This directory is where the system stores log files from the operating system, and it’s components. </li></ul>
  121. 121. Navigating around the system <ul><li>Let’s move to the /tmp directory. You change directories in Unix with the cd command, and the name of the directory as the argument. CD stands for Change Directory. </li></ul><ul><li># pwd </li></ul><ul><li>/ </li></ul><ul><li># cd /tmp </li></ul><ul><li># pwd </li></ul><ul><li>/tmp </li></ul><ul><li># </li></ul><ul><li>Notice, how the output of the pwd command changes. Now you are in the /tmp directory. You are no longer in the / directory. </li></ul>
  122. 122. Navigating around the system <ul><li>To move back to the directory you were just in, you can use the – argument to the cd command. </li></ul><ul><li># pwd </li></ul><ul><li>/tmp </li></ul><ul><li># cd - </li></ul><ul><li>/ </li></ul><ul><li># pwd </li></ul><ul><li>/ </li></ul><ul><li># cd - </li></ul><ul><li>/tmp </li></ul><ul><li># pwd </li></ul><ul><li>/tmp </li></ul><ul><li># </li></ul><ul><li>This is a shortcut in Unix shells to move back to your previous directory. </li></ul>
  123. 123. Navigating around the system <ul><li>To move back to your home directory, use the cd command with no arguments. </li></ul><ul><li># pwd </li></ul><ul><li>/tmp </li></ul><ul><li># cd </li></ul><ul><li># pwd </li></ul><ul><li>/ </li></ul><ul><li># </li></ul>
  124. 124. Navigating around the system <ul><li>Creating a directory, will give you a place to store files, and other directories (sub-directories). Use the mkdir command, short for MaKe DIRectory, to create a directory. </li></ul><ul><li># cd /tmp </li></ul><ul><li># pwd </li></ul><ul><li>/tmp </li></ul><ul><li># mkdir dira </li></ul><ul><li># cd dira </li></ul><ul><li># pwd </li></ul><ul><li>/tmp/dira </li></ul><ul><li># ls </li></ul><ul><li># </li></ul><ul><li>Notice the new directory path, and how there are no files in this new directory. </li></ul><ul><li>Note, directory names have a limit of 256 characters – (alphanumeric). </li></ul>
  125. 125. Navigating around the system <ul><li>Go ahead and create another sub-directory in this current directory, and also some empty files. Empty files are created with the Unix command touch. </li></ul><ul><li># pwd </li></ul><ul><li>/tmp/dira </li></ul><ul><li># ls </li></ul><ul><li># </li></ul><ul><li># mkdir dirab </li></ul><ul><li># touch filea fileb filec </li></ul><ul><li># ls </li></ul><ul><li>dirab filea fileb filec </li></ul><ul><li># </li></ul><ul><li># ls -F </li></ul><ul><li>dirab/ filea fileb filec </li></ul><ul><li># </li></ul><ul><li>Note, file names have a limit of 256 characters – (alphanumeric). </li></ul>
  126. 126. Navigating around the system <ul><li>One imperative concept to keep in mind when discussing directories, and files, is the concept of location. Remember the directory and file structure on Unix systems are setup as an hierarchy. </li></ul><ul><li>There are two location types when it comes to directories and files. </li></ul><ul><li>Absolute – (Fully Qualified Path name) </li></ul><ul><li>Relative </li></ul><ul><li>An example of a an absolute/fully qualified pathname is: </li></ul><ul><li># ls -l /tmp/dira/filea </li></ul><ul><li>-rw-r--r-- 1 root system 0 Dec 02 09:08 /tmp/dira/filea </li></ul><ul><li># </li></ul><ul><li>An example of a relative pathname is: </li></ul><ul><li># cd /tmp/dira  Note, I moved to the dira directory via it’s absolute/fully qualified pathname. </li></ul><ul><li># pwd </li></ul><ul><li>/tmp/dira </li></ul><ul><li># ls -l filea </li></ul><ul><li>-rw-r--r-- 1 root system 0 Dec 02 09:08 filea </li></ul>
  127. 127. Navigating around the system <ul><li>Getting back to creating directories. </li></ul><ul><li>Let’s say you wanted to create a file called testfile, but the fully qualified path of this file was to be: </li></ul><ul><li>/tmp/testdir/testdir2/testdir3/testfile </li></ul><ul><li>No problem, right? Go ahead and create the file: </li></ul><ul><li># touch /tmp/testdir/testdir2/testdir3/testfile </li></ul><ul><li>touch: 0652-046 Cannot create /tmp/testdir/testdir2/testdir3/testfile. </li></ul><ul><li># </li></ul><ul><li>You can’t because the directories don’t exist. Ok, no problem again, right? Let’s go ahead and create the directories for this file: </li></ul><ul><li># mkdir /tmp/testdir/testdir2/testdir3 </li></ul><ul><li>mkdir: 0653-357 Cannot access directory /tmp/testdir/testdir2. </li></ul><ul><li>/tmp/testdir/testdir2: A file or directory in the path name does not exist. </li></ul><ul><li># </li></ul>
  128. 128. Navigating around the system <ul><li>This did not work either. Why? It didn’t work because a directory needs to exist before its subdirectory can exist. To direct the mkdir command to automatically create all directories in this fully qualified path use the –p option: </li></ul><ul><li># mkdir -p /tmp/testdir/testdir2/testdir3 </li></ul><ul><li># touch /tmp/testdir/testdir2/testdir3/testfile </li></ul><ul><li># ls -ld /tmp/testdir/testdir2/testdir3 </li></ul><ul><li>drwxr-xr-x 2 root system 256 Dec 02 08:56 /tmp/testdir/testdir2/testdir3 </li></ul><ul><li># </li></ul><ul><li># ls -l /tmp/testdir/testdir2/testdir3 </li></ul><ul><li>total 0 </li></ul><ul><li>-rw-r--r-- 1 root system 0 Dec 02 08:56 testfile </li></ul>
  129. 129. Navigating around the system <ul><li>There are two special files called, “.” and “..” </li></ul><ul><li>. Represents the present directory, while .. represents the directory a level above, the one you are currently in. </li></ul><ul><li># ls -l </li></ul><ul><li>total 16 </li></ul><ul><li>drwxr-xr-x 3 root system 256 Sep 4 23:04 . </li></ul><ul><li>drwxrwxrwt 4 bin bin 4096 Sep 5 16:05 .. </li></ul><ul><li>drwxr-xr-x 2 root system 256 Sep 4 22:24 dirab </li></ul><ul><li>-rw-r--r-- 1 root system 0 Sep 4 22:23 filea </li></ul><ul><li>-rw-r--r-- 1 root system 0 Sep 4 22:23 fileb </li></ul><ul><li>-rw-r--r-- 1 root system 0 Sep 4 22:23 filec </li></ul><ul><li># pwd </li></ul><ul><li>/tmp/dira </li></ul><ul><li># cd .. </li></ul><ul><li># pwd </li></ul><ul><li>/tmp </li></ul><ul><li># cd .. </li></ul><ul><li># pwd </li></ul><ul><li>/ </li></ul><ul><li># cd /tmp/dira </li></ul>
  130. 130. Navigating around the system <ul><li>You can use wildcards as a way to display files on a Unix system. </li></ul><ul><li>Wilds cards are a way to list files when you don’t really know the full name of them, and only know a portion of their names. The wildcard characters we use in Unix are: *, ?, and […]. </li></ul><ul><li># ls </li></ul><ul><li>dirab filea fileb filec </li></ul><ul><li># ls f* </li></ul><ul><li>filea fileb filec </li></ul><ul><li># ls file[a-b] </li></ul><ul><li>filea fileb </li></ul><ul><li># ls f????a </li></ul><ul><li>f????a not found </li></ul><ul><li># ls f??e? </li></ul><ul><li>filea fileb filec </li></ul><ul><li># </li></ul>
  131. 131. Navigating around the system <ul><li>Another way to create a file is to re-direct a command’s output to a file. This is called re-directing stdout – STanDard OUTput. </li></ul><ul><li># date > filed </li></ul><ul><li># cat filed </li></ul><ul><li>Fri Sep 4 22:35:16 EDT 2009 </li></ul><ul><li># ls -l </li></ul><ul><li>total 8 </li></ul><ul><li>drwxr-xr-x 2 root system 256 Sep 4 22:24 dirab </li></ul><ul><li>-rw-r--r-- 1 root system 0 Sep 4 22:23 filea </li></ul><ul><li>-rw-r--r-- 1 root system 0 Sep 4 22:23 fileb </li></ul><ul><li>-rw-r--r-- 1 root system 0 Sep 4 22:23 filec </li></ul><ul><li>-rw-r--r-- 1 root system 29 Sep 4 22:35 filed </li></ul><ul><li># </li></ul><ul><li>If you use double greater than sign >>, then that command’s output will append to the end of the already existing file </li></ul><ul><li># date >> filed </li></ul><ul><li># cat filed </li></ul><ul><li>Fri Sep 4 22:35:16 EDT 2009 </li></ul><ul><li>Fri Sep 4 22:37:33 EDT 2009 </li></ul><ul><li># </li></ul>
  132. 132. Navigating around the system <ul><li>If you use a single greater than sign again, it will overwrite the contents of the existing file </li></ul><ul><li># date > filed </li></ul><ul><li># cat filed </li></ul><ul><li>Fri Sep 4 22:38:57 EDT 2009 </li></ul><ul><li># </li></ul><ul><li>Commands which end with errors do not get directed to a file by default. They get directed to something which called stderr – STanDard ERRor. </li></ul><ul><li># dati > filed </li></ul><ul><li>Ksh: dati: not found </li></ul><ul><li># cat filed </li></ul><ul><li># </li></ul><ul><li># dati 2> filed </li></ul><ul><li># cat filed </li></ul><ul><li>ksh: dati: not found </li></ul><ul><li># dati 2>> filed </li></ul><ul><li># cat filed </li></ul><ul><li>ksh: dati: not found </li></ul><ul><li>ksh: dati: not found </li></ul>
  133. 133. Navigating around the system <ul><li>There is a special file in Unix called /dev/null, among others. </li></ul><ul><li>This is commonly referred to as the “Black Hole” </li></ul><ul><li>It’s a place to re-direct output you don’t want. Whatever you re-direct to it just gets thrown away. It goes nowhere. </li></ul><ul><li># ls -l /dev/null </li></ul><ul><li>crw-rw-rw- 1 root system 2, 2 Dec 03 13:12 /dev/null </li></ul><ul><li># date > /dev/null </li></ul><ul><li># ls -l > /dev/null </li></ul><ul><li># cat /dev/null </li></ul><ul><li># </li></ul><ul><li># ls -l /dev/null </li></ul><ul><li>crw-rw-rw- 1 root system 2, 2 Dec 03 13:12 /dev/null </li></ul><ul><li># </li></ul>
  134. 134. Navigating around the system <ul><li>If you wanted output to be re-directed to a file and to your stdout, the screen simultaneously, then you would use the tee command. </li></ul><ul><li># date | tee filed </li></ul><ul><li>Fri Sep 4 22:54:07 EDT 2009 </li></ul><ul><li># cat filed </li></ul><ul><li>Fri Sep 4 22:54:07 EDT 2009 </li></ul><ul><li># </li></ul><ul><li>If you wanted to append to a file using tee, you would use the –a option of the tee command. </li></ul><ul><li># date | tee filed </li></ul><ul><li>Fri Sep 4 22:56:27 EDT 2009 </li></ul><ul><li># cat filed </li></ul><ul><li>Fri Sep 4 22:56:27 EDT 2009 </li></ul><ul><li># </li></ul><ul><li># date | tee -a filed </li></ul><ul><li>Fri Sep 4 22:57:24 EDT 2009 </li></ul><ul><li># cat filed </li></ul><ul><li>Fri Sep 4 22:56:27 EDT 2009 </li></ul><ul><li>Fri Sep 4 22:57:24 EDT 2009 </li></ul><ul><li># </li></ul>
  135. 135. Navigating around the system <ul><li>If you wanted to copy a file, you would use the cp command. </li></ul><ul><li># ls -l filed </li></ul><ul><li>-rw-r--r-- 1 root system 58 Sep 4 22:57 filed </li></ul><ul><li># cp filed filee </li></ul><ul><li># ls -l filed filee </li></ul><ul><li>-rw-r--r-- 1 root system 58 Sep 4 22:57 filed </li></ul><ul><li>-rw-r--r-- 1 root system 58 Sep 4 23:01 filee </li></ul><ul><li># cat filed </li></ul><ul><li>Fri Sep 4 22:56:27 EDT 2009 </li></ul><ul><li>Fri Sep 4 22:57:24 EDT 2009 </li></ul><ul><li># cat filee </li></ul><ul><li>Fri Sep 4 22:56:27 EDT 2009 </li></ul><ul><li>Fri Sep 4 22:57:24 EDT 2009 </li></ul><ul><li># </li></ul>
  136. 136. Navigating around the system <ul><li>If you wanted to move/rename a file, you would use the mv command. </li></ul><ul><li># ls -l filed filee </li></ul><ul><li>-rw-r--r-- 1 root system 58 Sep 4 22:57 filed </li></ul><ul><li>-rw-r--r-- 1 root system 58 Sep 4 23:01 filee </li></ul><ul><li># mv filed filee </li></ul><ul><li># ls -l filed filee </li></ul><ul><li>filed not found </li></ul><ul><li>-rw-r--r-- 1 root system 58 Sep 4 22:57 filee </li></ul><ul><li># ls -l </li></ul><ul><li>total 8 </li></ul><ul><li>drwxr-xr-x 2 root system 256 Sep 4 22:24 dirab </li></ul><ul><li>-rw-r--r-- 1 root system 0 Sep 4 22:23 filea </li></ul><ul><li>-rw-r--r-- 1 root system 0 Sep 4 22:23 fileb </li></ul><ul><li>-rw-r--r-- 1 root system 0 Sep 4 22:23 filec </li></ul><ul><li>-rw-r--r-- 1 root system 58 Sep 4 22:57 filee </li></ul><ul><li># </li></ul>
  137. 137. Navigating around the system <ul><li>To remove a directory you use the rmdir command, which is short for ReMove DIRectory: </li></ul><ul><li># ls -ld dirab </li></ul><ul><li>drwxr-xr-x 2 root system 256 Nov 27 19:57 dirab </li></ul><ul><li># rmdir dirab </li></ul><ul><li># ls -ld dirab </li></ul><ul><li>ls: 0653-341 The file dirab does not exist. </li></ul><ul><li># </li></ul>
  138. 138. Navigating around the system <ul><li>To remove a file use the rm command, which is short for ReMove. </li></ul><ul><li># ls -l </li></ul><ul><li>total 0 </li></ul><ul><li>-rw-r--r-- 1 root system 0 Sep 4 14:43 filea </li></ul><ul><li>-rw-r--r-- 1 root system 0 Sep 4 14:43 fileb </li></ul><ul><li>-rw-r--r-- 1 root system 0 Sep 4 14:43 filec </li></ul><ul><li>-rw-r--r-- 1 root system 58 Sep 4 23:01 filee </li></ul><ul><li># </li></ul><ul><li># rm filea </li></ul><ul><li># ls -l </li></ul><ul><li>total 0 </li></ul><ul><li>-rw-r--r-- 1 root system 0 Sep 4 14:43 fileb </li></ul><ul><li>-rw-r--r-- 1 root system 0 Sep 4 14:43 filec </li></ul><ul><li># rm fileb filec filee </li></ul><ul><li># ls -l </li></ul><ul><li>total 0 </li></ul><ul><li># </li></ul>
  139. 139. Navigating around the system <ul><li>Getting back to directories for a moment: </li></ul><ul><li>Create a directory called: /tmp/testdir </li></ul><ul><li># mkdir /tmp/testdir </li></ul><ul><li>Now populate that directory with files: </li></ul><ul><li># touch /tmp/testdir/file1 </li></ul><ul><li># touch /tmp/testdir/file2 </li></ul><ul><li># touch /tmp/testdir/file3 </li></ul><ul><li># ls -l /tmp/testdir </li></ul><ul><li>total 0 </li></ul><ul><li>-rw-r--r-- 1 root system 0 Dec 02 08:44 file1 </li></ul><ul><li>-rw-r--r-- 1 root system 0 Dec 02 08:44 file2 </li></ul><ul><li>-rw-r--r-- 1 root system 0 Dec 02 08:44 file3 </li></ul><ul><li># </li></ul>
  140. 140. Navigating around the system <ul><li>Now attempt to remove this directory: </li></ul><ul><li># rmdir /tmp/testdir </li></ul><ul><li>rmdir: 0653-611 Directory /tmp/testdir is not empty. </li></ul><ul><li># </li></ul><ul><li>You were not able to do so, because this directory is not empty. You have two options, you can delete everything in this directory manually, or you could issue the following command: </li></ul><ul><li># rm -r /tmp/testdir </li></ul><ul><li># ls -ld /tmp/testdir </li></ul><ul><li>ls: 0653-341 The file /tmp/testdir does not exist. </li></ul><ul><li># </li></ul>
  141. 141. SMIT – System Management Interface Tool
  142. 142. SMIT <ul><li>AIX has the most extensive unix systems management tool – smit </li></ul><ul><li>SMIT </li></ul><ul><ul><li>Systems Management Interface Tool </li></ul></ul><ul><li>Invoke using the command smit or smitty </li></ul><ul><li>Logging under user home directory </li></ul><ul><ul><li>Root this is typically /smit.log </li></ul></ul><ul><li>Commands run are stored in user home directory </li></ul><ul><ul><li>Root this is typically /smit.script </li></ul></ul><ul><li>Used for auditing, building scripts </li></ul><ul><li>SMIT covers about ~95% of system administration tasks. </li></ul><ul><li>SMIT executes commands under the covers to accomplish it’s tasks. </li></ul><ul><li>Configuration entered via SMIT menus are persistent across reboots. </li></ul><ul><li>SMIT menus can be created, and tailored to any environment. </li></ul>
  143. 143. SMIT <ul><li># smitty </li></ul>
  144. 144. SMIT
  145. 145. SMIT
  146. 146. SMIT <ul><li>To move back a screen in smit press the <F3> key. </li></ul>
  147. 147. SMIT <ul><li>Pressing <F10> will exit smit all together. </li></ul><ul><li># </li></ul>
  148. 148. SMIT <ul><li>Fast paths are a shortcut in SMIT, allowing you to jump down the menu hierarchy right to the menu you desire. </li></ul><ul><li># smitty users </li></ul>
  149. 149. SMIT <ul><li>The fast path of a specific menu screen can be determined by pressing the <F8> key while in that menu. Note, if it’s a text screen session press ESC+#. </li></ul><ul><li>Press <F10> to exit smit. </li></ul>
  150. 150. SMIT <ul><li>You can use the smit <F6> key while in a menu, to determine which command smit is calling under the convers. </li></ul><ul><li># smitty shutdown </li></ul><ul><li><F10> </li></ul>
  151. 151. SMIT <ul><li>You could use the SMIT <F9> key to exit out to an AIX command shell prompt, temporarily, from within a SMIT menu. </li></ul><ul><li># smitty </li></ul><ul><li># smitty </li></ul><ul><li>Press <F9> </li></ul><ul><li># </li></ul>
  152. 152. SMIT
  153. 153. SMIT <ul><li>Type in the command exit, to return to the SMIT menu session. </li></ul><ul><li># </li></ul><ul><li># exit </li></ul>
  154. 154. SMIT <ul><li>You can press <F1> at any point while in SMIT to view the help of that particular SMIT menu screen </li></ul><ul><li><F10> </li></ul>
  155. 155. SMIT <ul><li>Go to the change user attribute smitty window via it’s fastpath. Hit <F4>. This will generate a pick list. Smit provides this as a easy way to select the object, in this case user name, you would like to edit. </li></ul><ul><li># smitty chuser </li></ul>
  156. 156. SMIT <ul><li>Smitty also has a search string function. When you want to search for something in a smit screen use the / key, and then type in the string you wish to search for in that smit menu. </li></ul>
  157. 157. SMIT <ul><li>Hit <F10> to exit smitty. </li></ul>
  158. 158. SMIT <ul><li>SMIT also has a graphical version. </li></ul>
  159. 159. SMIT <ul><li>In graphical SMIT, there is a graphic of a man, “rocky”, running when a command is running: </li></ul>
  160. 160. SMIT <ul><li>In graphical SMIT there is a graphic of a man, “rocky”, who falls flat on his face when a command fails. </li></ul>
  161. 161. SMIT <ul><li>In graphical SMIT there is a graphic of a man, “rocky”, who raises his hand in triumph following a successful command execution </li></ul>
  162. 162. SMIT
  163. 163. AIX User Management
  164. 164. AIX User Management <ul><li>To create a user-id on AIX, either use the smit, System Management Interface Tool, or the command mkuser, which is short for MaKeUSER. </li></ul><ul><li>Note, there is a limit of 8 alphanumeric characters for a user name. </li></ul><ul><li>I prefer to use smit. It’s more productive than the command line. - </li></ul><ul><li># smitty mkuser </li></ul><ul><li>USE YOUR FIRST NAME </li></ul>
  165. 165. AIX User Management <ul><li>What is the mkuser doing ? </li></ul><ul><ul><li>Modifying files: </li></ul></ul><ul><ul><ul><li>/etc/passwd. /etc/group </li></ul></ul></ul><ul><ul><ul><li>Also /etc/security/passwd, group, users, limits </li></ul></ul></ul><ul><li>These files can be edited </li></ul><ul><li>If they get out of sync, check for consistency: </li></ul><ul><ul><li>usrck </li></ul></ul><ul><ul><li>pwdck </li></ul></ul><ul><ul><li>grpck </li></ul></ul>
  166. 166. AIX User Management <ul><li>Users on the system are defined in the /etc/passwd file. </li></ul><ul><li>This file has the following format. </li></ul><ul><li>USER_NAME : LOGIN_SYMBOL : UID : GID :GECOS: HOME_DIRECTORY : SHELL </li></ul><ul><li>The ! in the second field indicates that the password is in the shadow file. </li></ul><ul><li>The * in the second field indicates that the user can’t login. </li></ul><ul><li># ls -l /etc/passwd </li></ul><ul><li>-rw-r--r-- 1 root security 484 Sep 5 21:38 /etc/passwd </li></ul><ul><li># cat /etc/passwd </li></ul><ul><li>root:!:0:0::/:/usr/bin/ksh </li></ul><ul><li>daemon:!:1:1::/etc: </li></ul><ul><li>bin:!:2:2::/bin: </li></ul><ul><li>sys:!:3:3::/usr/sys: </li></ul><ul><li>adm:!:4:4::/var/adm: </li></ul><ul><li>uucp:!:5:5::/usr/lib/uucp: </li></ul><ul><li>guest:!:100:100::/home/guest: </li></ul><ul><li>nobody:!:4294967294:4294967294::/: </li></ul><ul><li>lpd:!:9:4294967294::/: </li></ul><ul><li>lp:*:11:11::/var/spool/lp:/bin/false </li></ul><ul><li>snapp:*:200:12:snapp login user:/usr/sbin/snapp:/usr/sbin/snappd </li></ul><ul><li>nuucp:*:6:5:uucp login user:/var/spool/uucppublic:/usr/sbin/uucp/uucico </li></ul>
  167. 167. AIX User Management <ul><li>The shadow file, is where the encrypted password of all users are kept. The /etc/passwd file is read by user-ids as they log into the system, the ! next to their userid in that file, tells the login program to check the shadow file, /etc/security/passwd, for the actual password to authenticate you into the system. Older Unix systems used the /etc/passwd file to store the encrypted password. </li></ul><ul><li># ls -l /etc/security/passwd </li></ul><ul><li>-rw------- 1 root security 313 Sep 5 21:42 /etc/security/passwd </li></ul><ul><li># cat /etc/security/passwd </li></ul><ul><li>root: </li></ul><ul><li>password = Fy0ubxgHHBrFM </li></ul><ul><li>lastupdate = 1252082327 </li></ul><ul><li>flags = </li></ul><ul><li>daemon: </li></ul><ul><li>password = * </li></ul><ul><li>bin: </li></ul><ul><li>password = * </li></ul><ul><li>… . </li></ul>
  168. 168. AIX User Management <ul><li>The /etc/group file contains the user/group memberships of all users defined to the system. Note the second field, ! , is not valid anymore. </li></ul><ul><li># ls -l /etc/group </li></ul><ul><li>-rw-r--r-- 1 root security 327 Sep 5 21:37 /etc/group </li></ul><ul><li># cat /etc/group </li></ul><ul><li>system:!:0:root,pconsole </li></ul><ul><li>staff:!:1:justin </li></ul><ul><li>bin:!:2:root,bin </li></ul><ul><li>sys:!:3:root,bin,sys </li></ul><ul><li>adm:!:4:bin,adm </li></ul><ul><li>uucp:!:5:uucp,nuucp </li></ul><ul><li>mail:!:6: </li></ul><ul><li>security:!:7:root </li></ul><ul><li>cron:!:8:root </li></ul><ul><li>printq:!:9:lp </li></ul><ul><li>audit:!:10:root </li></ul><ul><li>ecs:!:28: </li></ul><ul><li>nobody:!:4294967294:nobody,lpd </li></ul><ul><li>usr:!:100:guest </li></ul><ul><li>perf:!:20: </li></ul><ul><li>shutdown:!:21: </li></ul><ul><li>lp:!:11:root,lp </li></ul><ul><li>snapp:!:12:snapp </li></ul><ul><li>pconsole:!:13:pconsole </li></ul>
  169. 169. AIX User Management <ul><li>After the user is created you will see it via the id command, or listusers command. </li></ul><ul><li># id justin </li></ul><ul><li>uid=202(justin) gid=1(staff) </li></ul><ul><li># listusers </li></ul><ul><li>guest </li></ul><ul><li>justin </li></ul><ul><li>lp </li></ul><ul><li>nobody </li></ul><ul><li>pconsole </li></ul><ul><li>snapp snapp login user </li></ul><ul><li># </li></ul><ul><li>After you create the user id, you as root will have to set that user id’s login password </li></ul><ul><li># passwd justin </li></ul><ul><li>Changing password for &quot;justin&quot; </li></ul><ul><li>justin's New password: </li></ul><ul><li>Re-enter justin's new password: </li></ul><ul><li># </li></ul><ul><li>Note, there is a limit of 8 alphanumeric characters for a user’s password. </li></ul>
  170. 170. AIX User Management <ul><li>Now log off, by typing in exit, and then login again as user justin. </li></ul><ul><li># exit </li></ul><ul><li>Connection Closed. (Putty closes). </li></ul><ul><li>Connect to the system again, and login as newly created user justin </li></ul><ul><li>AIX Version 6 </li></ul><ul><li>Copyright IBM Corporation, 1982, 2007. </li></ul><ul><li>login: justin </li></ul><ul><li>justin's Password: </li></ul><ul><li>[compat]: You are required to change your password. Please choose a new one. </li></ul><ul><li>justin's New password: </li></ul><ul><li>Re-enter justin's new password: </li></ul><ul><li>*************************************************************************************** </li></ul><ul><li>* * </li></ul><ul><li>* * </li></ul><ul><li>* Welcome to AIX Version 6.1! * </li></ul><ul><li>* * </li></ul><ul><li>* * </li></ul><ul><li>* Please see the README file in /usr/lpp/bos for information pertinent to * </li></ul><ul><li>* this release of the AIX Operating System. * </li></ul><ul><li>* * </li></ul><ul><li>* * </li></ul><ul><li>*************************************************************************************** </li></ul><ul><li>$ </li></ul>
  171. 171. AIX User Management <ul><li>Notice, even though you as root set this user’s password. The system still prompts the user to change this password upon initial login. This is done for security reasons. </li></ul><ul><li>Also, notice that the same message of the day is displayed to this user when they login. </li></ul><ul><li>After the user logs in notice the dollar-sign, $, shell prompt. This shell prompt indicates that this user is a regular, non-root/admin user. </li></ul><ul><li>The id command will verify that you are now logged in as user justin. </li></ul><ul><li>$ id </li></ul><ul><li>uid=202(justin) gid=1(staff) </li></ul><ul><li>$ </li></ul><ul><li>Also notice the default user group. The user is automatically put in the staff user group when created. This is for all non-admin users. </li></ul>
  172. 172. AIX User Management <ul><li>Notice this initial directory you are placed in when you first log into the system. The default home directory for non-root users is /home/user_name. </li></ul><ul><li>$ pwd </li></ul><ul><li>/home/justin </li></ul><ul><li>$ </li></ul><ul><li>There is a special character which is used as a short cut for someone’s home directory. A way to go to your home directory use ~USER </li></ul><ul><li>$ ls -ld ~ </li></ul><ul><li>drwxr-xr-x 2 justin staff 256 Dec 02 10:35 /home/justin </li></ul><ul><li>$ ls -ld ~justin </li></ul><ul><li>drwxr-xr-x 2 justin staff 256 Dec 02 10:35 /home/justin </li></ul><ul><li>$ ls -ld ~guest </li></ul><ul><li>drwxr-xr-x 2 guest usr 256 Apr 15 2010 /home/guest </li></ul><ul><li>$ grep -i guest /etc/passwd </li></ul><ul><li>guest:!:100:100::/home/guest: </li></ul><ul><li>$ </li></ul>
  173. 173. AIX User Management <ul><li>Recommended home directory setup for environments. Justin Tip!!! Setup a sub home directory up for each user group within your organization. </li></ul><ul><li>DBAs’ home directories: </li></ul><ul><li># ls -ld /home/dba </li></ul><ul><li>drwxr-xr-x 15 oracle dba 512 Jul 25 10:49 /home/dba </li></ul><ul><li># ls -l /home/dba </li></ul><ul><li>total 13 </li></ul><ul><li>drwxr-xr-x 2 chouer dba 512 Jan 10 2006 chouer </li></ul><ul><li>drwxr-xr-x 2 daifran dba 512 Jul 03 09:31 daifran </li></ul><ul><li>drwxr-xr-x 2 govindb dba 512 Jul 25 10:49 govindb </li></ul><ul><li>drwxr-xr-x 2 harishp dba 512 May 23 2005 harishp </li></ul><ul><li>drwxr-xr-x 2 heuveln dba 512 Jun 22 03:38 heuveln </li></ul><ul><li>drwxr-xr-x 2 jaschif dba 512 Jun 05 10:58 jaschif </li></ul><ul><li>drwxr-xr-x 2 lipaul dba 512 May 28 2005 lipaul </li></ul><ul><li>drwxr-xr-x 2 oracle dba 512 Jul 18 09:10 oracle </li></ul><ul><li>drwxr-xr-x 2 raghupm dba 512 Jun 25 15:53 raghupm </li></ul><ul><li>drwxr-xr-x 2 suhjos dba 512 Mar 28 2005 suhjos </li></ul><ul><li>drwxr-xr-x 2 witten dba 512 Apr 10 2006 witten </li></ul><ul><li>drwxr-xr-x 2 xiaodan dba 512 Dec 05 2005 xiaodan </li></ul><ul><li>drwxr-xr-x 2 zhengw dba 512 Sep 13 2005 zhengw </li></ul>
  174. 174. AIX User Management <ul><li>The application administrator's home directories: </li></ul><ul><li># ls -ld /home/appl </li></ul><ul><li>drwxrwxrwx 14 root appldev 512 Jul 31 11:27 /home/appl </li></ul><ul><li># ls -l /home/appl </li></ul><ul><li>total 12 </li></ul><ul><li>drwxr-xr-x 2 bastenp dstage 512 Jul 11 12:28 bastenp </li></ul><ul><li>drwxr-xr-x 2 flakew dstage 512 Jul 10 15:02 flakew </li></ul><ul><li>drwxr-xr-x 2 hendrik dstage 512 Jul 24 15:22 hendrik </li></ul><ul><li>drwxr-xr-x 4 kilcult dstage 512 Jul 18 11:43 kilkult </li></ul><ul><li>drwxr-xr-x 2 moserm dstage 512 Jul 10 15:14 moserm </li></ul><ul><li>drwxr-xr-x 2 mountj dstage 512 Jul 10 15:08 mountj </li></ul><ul><li>drwxr-xr-x 2 rathins dstage 512 Jul 10 15:05 rathens </li></ul><ul><li>drwxr-xr-x 3 rathins dstage 512 Jul 20 10:40 rathins </li></ul><ul><li>drwxr-xr-x 2 vanhoop dstage 512 Jul 30 08:02 vanhoop </li></ul><ul><li>drwxr-xr-x 2 werfad dstage 512 Jul 16 01:29 werfad </li></ul><ul><li>drwxr-xr-x 2 zagorob dstage 512 Jul 31 11:27 zagorob </li></ul><ul><li>drwxr-xr-x 2 zagorob dstage 512 Jul 31 11:25 zagorov </li></ul>
  175. 175. AIX User Management <ul><li>Reset your own password to something different. </li></ul><ul><li>$ id </li></ul><ul><li>uid=206(justin) gid=1(staff) </li></ul><ul><li>$ passwd </li></ul><ul><li>Changing password for &quot;justin&quot; </li></ul><ul><li>justin's Old password: </li></ul><ul><li>justin's New password: </li></ul><ul><li>Re-enter justin's new password: </li></ul><ul><li>$ </li></ul><ul><li>Now, log off of the system as user justin by typing in the exit command, and then log into the system again as user root. </li></ul>
  176. 176. AIX User Management <ul><li>Let’s say that user justin calls you, the admin, and confesses to you that they have forgotten their login password, and you have to reset it now for them. You do that with the passwd justin command as you did before, but notice the difference between when you set the password as the user him/herself, and when you set the password as the root user. Notice that when you reset it as the user themselves you will be prompted for the old password, and then the new one. This is done for security reasons, but when you set someone else’s password as the root user, you are not required to provide the current password. Root has the power to override this extra security check, and this will also prove useful when resetting a forgotten password for someone. </li></ul>
  177. 177. AIX User Management <ul><li>To determine who is currently logged into the system use the who command </li></ul><ul><li># who </li></ul><ul><li>root pts/0 Sep 5 21:25 (192.168.220.9) </li></ul><ul><li># </li></ul>
  178. 178. AIX User Management <ul><li>The last command can assist you in determining the login history of a user into the system. </li></ul><ul><li># last root </li></ul><ul><li>root pts/0 192.168.220.9 Sep 05 21:25 still logged in </li></ul><ul><li>root pts/0 192.168.220.9 Sep 05 17:10 - 19:11 (02:00) </li></ul><ul><li>… </li></ul>
  179. 179. AIX User Management <ul><li>Let’s say you wanted to perform some sort of system maintenance, and you didn’t want any users to login during this time. You can do this with a file called /etc/nologin. Any string you put in that file will be displayed to users attempting to log into the system. </li></ul><ul><li># echo &quot;THE SYSTEM IS CURRENTLY UNAVAILABLE. CHECK BACK LATER.&quot; > /etc/nologin </li></ul><ul><li># ls -l /etc/nologin </li></ul><ul><li>-rw-r--r-- 1 root system 55 Sep 5 22:42 /etc/nologin </li></ul><ul><li># cat /etc/nologin </li></ul><ul><li>THE SYSTEM IS CURRENTLY UNAVAILABLE. CHECK BACK LATER. </li></ul><ul><li># </li></ul><ul><li>Now, log out with exit, and attempt to login as user: justin: </li></ul><ul><li>AIX Version 6 </li></ul><ul><li>Copyright IBM Corporation, 1982, 2007. </li></ul><ul><li>login: justin </li></ul><ul><li>justin's Password: </li></ul><ul><li>THE SYSTEM IS CURRENTLY UNAVAILABLE. CHECK BACK LATER. </li></ul><ul><li>login: </li></ul><ul><li>Note: The echo command is discussed in more depth in a Unix programming/shell scripting course. </li></ul>
  180. 180. AIX User Management <ul><li>Note, the root user can bypass this restriction and logon. Also, user’s currently logged on, when you create this file will not be affected. Test that root can override this. Login again as root and it will succeed, regardless of this /etc/nologin file being present: </li></ul><ul><li>AIX Version 6 </li></ul><ul><li>Copyright IBM Corporation, 1982, 2010. </li></ul><ul><li>login: root </li></ul><ul><li>root's Password: </li></ul><ul><li>******************************************************************************* </li></ul><ul><li>* * </li></ul><ul><li>* * </li></ul><ul><li>* Welcome to AIX Version 6.1! * </li></ul><ul><li>* * </li></ul><ul><li>* * </li></ul><ul><li>* Please see the README file in /usr/lpp/bos for information pertinent to * </li></ul><ul><li>* this release of the AIX Operating System. * </li></ul><ul><li>* * </li></ul><ul><li>* * </li></ul><ul><li>******************************************************************************* </li></ul><ul><li>Last unsuccessful login: Wed Dec 1 00:59:52 CST 2010 on /dev/pts/1 from gvicaix01 </li></ul><ul><li>Last login: Thu Dec 2 08:39:45 CST 2010 on /dev/pts/0 from 192.168.250.8 </li></ul>
  181. 181. AIX User Management <ul><li>When you remove this file, then users will be able to log into the system once again. </li></ul><ul><li># ls -l /etc/nologin </li></ul><ul><li>-rw-r--r-- 1 root system 55 Sep 5 22:42 /etc/nologin </li></ul><ul><li># rm /etc/nologin </li></ul><ul><li># ls -l /etc/nologin </li></ul><ul><li>/etc/nologin not found </li></ul><ul><li># </li></ul><ul><li>Non-root logins are now re-enabled once again. Please note that rebooting the system will automatically remove this file from the system as well. </li></ul>
  182. 182. AIX User Management <ul><li>Log out, with the exit command, and then log back into the system as the justin user, to verify that non-root user logins are now re-enabled. </li></ul><ul><li># exit </li></ul><ul><li>Connection closed </li></ul><ul><li>AIX Version 6 </li></ul><ul><li>Copyright IBM Corporation, 1982, 2010. </li></ul><ul><li>login: justin </li></ul><ul><li>justin's Password: </li></ul><ul><li>******************************************************************************* </li></ul><ul><li>* * </li></ul><ul><li>* * </li></ul><ul><li>* Welcome to AIX Version 6.1! * </li></ul><ul><li>* * </li></ul><ul><li>* * </li></ul><ul><li>* Please see the README file in /usr/lpp/bos for information pertinent to * </li></ul><ul><li>* this release of the AIX Operating System. * </li></ul><ul><li>* * </li></ul><ul><li>* * </li></ul><ul><li>******************************************************************************* </li></ul><ul><li>1 unsuccessful login attempt since last login. </li></ul><ul><li>Last unsuccessful login: Thu Dec 2 10:21:24 CST 2010 on /dev/pts/1 from 192.168.250.8 </li></ul><ul><li>Last login: Thu Dec 2 10:14:16 CST 2010 on /dev/pts/1 from loopback </li></ul>
  183. 183. AIX User Management <ul><li>Logout with, exit and log back into the system again as root: </li></ul><ul><li>$ exit </li></ul><ul><li>Connection closed </li></ul><ul><li>AIX Version 6 </li></ul><ul><li>Copyright IBM Corporation, 1982, 2010. </li></ul><ul><li>login: root </li></ul><ul><li>justin's Password: </li></ul><ul><li>******************************************************************************* </li></ul><ul><li>* * </li></ul><ul><li>* * </li></ul><ul><li>* Welcome to AIX Version 6.1! * </li></ul><ul><li>* * </li></ul><ul><li>* * </li></ul><ul><li>* Please see the README file in /usr/lpp/bos for information pertinent to * </li></ul><ul><li>* this release of the AIX Operating System. * </li></ul><ul><li>* * </li></ul><ul><li>* * </li></ul><ul><li>******************************************************************************* </li></ul><ul><li>1 unsuccessful login attempt since last login. </li></ul><ul><li>Last unsuccessful login: Thu Dec 2 10:21:24 CST 2010 on /dev/pts/1 from 192.168.250.8 </li></ul><ul><li>Last login: Thu Dec 2 10:14:16 CST 2010 on /dev/pts/1 from loopback </li></ul>
  184. 184. AIX User Management <ul><li>The default message of the day, MOTD, which is displayed when you log into the system can be changed. It’s changed by editing the file /etc/motd. </li></ul><ul><li># cat /etc/motd </li></ul><ul><li>*************************************************************************************** </li></ul><ul><li>* * </li></ul><ul><li>* * </li></ul><ul><li>* Welcome to AIX Version 6.1! * </li></ul><ul><li>* * </li></ul><ul><li>* * </li></ul><ul><li>* Please see the README file in /usr/lpp/bos for information pertinent to * </li></ul><ul><li>* this release of the AIX Operating System. * </li></ul><ul><li>* * </li></ul><ul><li>* * </li></ul><ul><li>*************************************************************************************** </li></ul><ul><li># </li></ul><ul><li># echo “Welcome to my AIX system” > /etc/motd </li></ul><ul><li># echo “” >> /etc/motd </li></ul><ul><li># banner production >> /etc/motd </li></ul><ul><li># echo “” >> /etc/motd </li></ul>
  185. 185. AIX User Management <ul><li># cat /etc/motd </li></ul><ul><li>Welcome to my AIX system </li></ul><ul><li>##### ##### #### ##### # # #### ##### # #### # # </li></ul><ul><li># # # # # # # # # # # # # # # # ## # </li></ul><ul><li># # # # # # # # # # # # # # # # # # </li></ul><ul><li>##### ##### # # # # # # # # # # # # # # </li></ul><ul><li># # # # # # # # # # # # # # # # ## </li></ul><ul><li># # # #### ##### #### #### # # #### # # </li></ul><ul><li># </li></ul>
  186. 186. AIX User Management <ul><li>Log off by typing in exit, and then login as root again. </li></ul><ul><li>AIX Version 6 </li></ul><ul><li>Copyright IBM Corporation, 1982, 2010. </li></ul><ul><li>login: root </li></ul><ul><li>root's Password: </li></ul><ul><li>Welcome to my AIX system </li></ul><ul><li>##### ##### #### ##### # # #### ##### # #### # # </li></ul><ul><li># # # # # # # # # # # # # # # # ## # </li></ul><ul><li># # # # # # # # # # # # # # # # # # </li></ul><ul><li>##### ##### # # # # # # # # # # # # # # </li></ul><ul><li># # # # # # # # # # # # # # # # ## </li></ul><ul><li># # # #### ##### #### #### # # #### # # </li></ul><ul><li>Last unsuccessful login: Fri Nov 26 19:48:33 CST 2010 on /dev/pts/0 from 192.168.220.54 </li></ul><ul><li>Last login: Sat Nov 27 17:44:28 CST 2010 on /dev/pts/0 from 192.168.240.117 </li></ul><ul><li># </li></ul>
  187. 187. AIX User Management <ul><li>Let’s say you as as a user, didn’t care to see the message of the day, MOTD, displayed to you every time you logged into the system. Well you can disable it. You disable it with a special file called .hushlogin. You place this file in the home directory of the user you wish to disable this for. </li></ul><ul><li>Log off of the system with exit, and log in as user justin again. </li></ul>
  188. 188. AIX User Management <ul><li>While in the home directory of that user, /home/justin, touch a file called .hushlogin. </li></ul><ul><li>$ pwd </li></ul><ul><li>/home/justin </li></ul><ul><li>$ ls -l .hushlogin </li></ul><ul><li>.hushlogin not found </li></ul><ul><li>$ touch .hushlogin </li></ul><ul><li>$ ls -l .hushlogin </li></ul><ul><li>-rw-r--r-- 1 justin staff 0 Sep 5 22:58 .hushlogin </li></ul><ul><li>$ </li></ul><ul><li>Now, that the file is created, log out, and then log back into the system as that user, justin, again. </li></ul>
  189. 189. AIX User Management <ul><li>Type exit, and then re-connect to the system again. Note, no MOTD is displayed upon login. </li></ul><ul><li>AIX Version 6 </li></ul><ul><li>Copyright IBM Corporation, 1982, 2007. </li></ul><ul><li>login: justin </li></ul><ul><li>justin's Password: </li></ul><ul><li>$ id </li></ul><ul><li>uid=202(justin) gid=1(staff) </li></ul><ul><li>$ pwd </li></ul><ul><li>/home/justin </li></ul><ul><li>$ </li></ul>
  190. 190. AIX User Management <ul><li>Exit and login as root again. Look at the message displayed prior to logging into the system.The First line starting with AIX, and the third one ending in login: is known as the herald message. It is the pre-login message displayed to the users when they go to log into the system, the MOTD discussed earlier is the post login message. </li></ul><ul><li>AIX Version 6 </li></ul><ul><li>Copyright IBM Corporation, 1982, 2007. </li></ul><ul><li>login: root </li></ul><ul><li>Password: </li></ul><ul><li>##### ##### #### ##### # # #### ##### # #### # # </li></ul><ul><li># # # # # # # # # # # # # # # # ## # </li></ul><ul><li># # # # # # # # # # # # # # # # # # </li></ul><ul><li>##### ##### # # # # # # # # # # # # # # </li></ul><ul><li># # # # # # # # # # # # # # # # ## </li></ul><ul><li># # # #### ##### #### #### # # #### # # </li></ul><ul><li>Last unsuccessful login: Fri Nov 26 22:52:19 CST 2010 on /dev/pts/0 from 192.168.220.54 </li></ul><ul><li>Last login: Sat Nov 27 16:19:57 CST 2010 on /dev/pts/1 from localhost </li></ul><ul><li># </li></ul>
  191. 191. AIX User Management <ul><li>There is a file called /etc/security/login.cfg which controls the global login, not user attributes of the system. To change the herald message you would change the parameter in this file. </li></ul><ul><li># cd /etc/security </li></ul><ul><li># pwd </li></ul><ul><li>/etc/security </li></ul><ul><li># ls -l login.cfg </li></ul><ul><li>-rw-r----- 1 root security 5548 Nov 27 16:20 login.cfg </li></ul><ul><li># chsec -f /etc/security/login.cfg -s default -a herald=&quot;Welcome to Company ABC's AIX computer systemnPlease enter your login name: “ </li></ul><ul><li># lssec -f /etc/security/login.cfg -s default -a herald </li></ul><ul><li>default herald=&quot;Welcome to Company ABC's AIX computer systemnPlease enter your login name: &quot; </li></ul><ul><li># </li></ul>
  192. 192. AIX User Management <ul><li>Close your putty session, logging out of the system, and then log back into the system as root: </li></ul><ul><li>Welcome to Company ABC's AIX computer system </li></ul><ul><li>Please enter your login name: root </li></ul><ul><li>root's Password: </li></ul><ul><li>##### ##### #### ##### # # #### ##### # #### # # </li></ul><ul><li># # # # # # # # # # # # # # # # ## # </li></ul><ul><li># # # # # # # # # # # # # # # # # # </li></ul><ul><li>##### ##### # # # # # # # # # # # # # # </li></ul><ul><li># # # # # # # # # # # # # # # # ## </li></ul><ul><li># # # #### ##### #### #### # # #### # # </li></ul><ul><li>Last unsuccessful login: Fri Nov 26 22:52:19 CST 2010 on /dev/pts/0 from 192.168.220.54 </li></ul><ul><li>Last login: Sat Nov 27 16:19:57 CST 2010 on /dev/pts/1 from localhost </li></ul><ul><li># </li></ul>
  193. 193. AIX User Management <ul><li>Now open a console/virtual terminal session to your system via the IVM. Notice the login herald/pre-login message displayed – The old/default one. </li></ul>
  194. 194. AIX User Management <ul><li>What did you notice? The default/old herald message is still being displayed when you log into the system this way. Also notice how it says Console Login, as oppose to just Login as with the other default/old herald message. This tells us that there are two different heralds, so two different settings, a console/virtual terminal via IVM, and a non-console/telnet herald message. To change the console login herald message: </li></ul><ul><li># cd /etc/security </li></ul><ul><li># pwd </li></ul><ul><li>/etc/security </li></ul><ul><li># ls –l login.cfg </li></ul><ul><li>-rw-r----- 1 root security 5637 Nov 27 16:36 login.cfg </li></ul><ul><li># chsec -f /etc/security/login.cfg -s /dev/console -a herald=&quot;Welcome to Company ABC's AIX computer systemnPlease enter your console login name:&quot; </li></ul><ul><li># </li></ul><ul><li>Restart your virtual console window from the IVM. </li></ul>
  195. 195. AIX User Management
  196. 196. AIX User Management <ul><li>If you close your putty session and then open it again, you will see that your other non-console herald message is still present. </li></ul><ul><li>Welcome to Company ABC's AIX computer system </li></ul><ul><li>Please enter your login name: root  No console string displayed </li></ul><ul><li>root's Password: </li></ul><ul><li>##### ##### #### ##### # # #### ##### # #### # # </li></ul><ul><li># # # # # # # # # # # # # # # # ## # </li></ul><ul><li># # # # # # # # # # # # # # # # # # </li></ul><ul><li>##### ##### # # # # # # # # # # # # # # </li></ul><ul><li># # # # # # # # # # # # # # # # ## </li></ul><ul><li># # # #### ##### #### #### # # #### # # </li></ul><ul><li>1 unsuccessful login attempt since last login. </li></ul><ul><li>Last unsuccessful login: Sat Nov 27 16:55:55 CST 2010 on /dev/pts/2 from 192.168.220.54 </li></ul><ul><li>Last login: Sat Nov 27 16:36:39 CST 2010 on /dev/pts/1 from 192.168.220.54 </li></ul><ul><li># </li></ul>
  197. 197. AIX User Management <ul><li>Notice back in the herald message login and password prompts: </li></ul><ul><li>Welcome to Company ABC's AIX computer system </li></ul><ul><li>Please enter your login name: root </li></ul><ul><li>root's Password: </li></ul><ul><li>Notice how they both display the user’s name. You can disable this in AIX, to tighten the security more of your system. </li></ul>
  198. 198. AIX User Management <ul><li># cd /etc/security </li></ul><ul><li># pwd </li></ul><ul><li>/etc/security </li></ul><ul><li># ls -l login.cfg </li></ul><ul><li>-rw-r----- 1 root security 5558 Nov 27 18:25 login.cfg </li></ul><ul><li># chsec -f /etc/security/login.cfg -s default -a usernameecho=false </li></ul><ul><li># </li></ul><ul><li>Close your putty session and then login again. Notice how the username is not echoed. </li></ul><ul><li>Welcome to Company ABC's AIX computer system </li></ul><ul><li>Please enter your login name:  User name is not displayed when typed. </li></ul><ul><li>****'s Password:  User name in password prompt is hidden. </li></ul><ul><li>Welcome to my AIX system </li></ul><ul><li>##### ##### #### ##### # # #### ##### # #### # # </li></ul><ul><li># # # # # # # # # # # # # # # # ## # </li></ul><ul><li># # # # # # # # # # # # # # # # # # </li></ul><ul><li>##### ##### # # # # # # # # # # # # # # </li></ul><ul><li># # # # # # # # # # # # # # # # ## </li></ul><ul><li># # # #### ##### #### #### # # #### # # </li></ul><ul><li>Last unsuccessful login: Sat Nov 27 16:55:55 CST 2010 on /dev/pts/2 from 192.168.220.54 </li></ul><ul><li>Last login: Sat Nov 27 18:29:17 CST 2010 on /dev/pts/7 from 192.168.220.54 </li></ul>
  199. 199. AIX User Management <ul><li>You can change the password prompt totally as well. </li></ul><ul><li># cd /etc/security </li></ul><ul><li># pwd </li></ul><ul><li>/etc/security </li></ul><ul><li># ls -l login.cfg </li></ul><ul><li>-rw-r----- 1 root security 5548 Nov 27 17:44 login.cfg </li></ul><ul><li># chsec -f /etc/security/login.cfg -s default -a pwdprompt=&quot;Please enter your user's login password: “ </li></ul><ul><li>Logout, and then log back into the system again with putty as root: </li></ul><ul><li>Welcome to Company ABC's AIX computer system </li></ul><ul><li>Please enter your login name: </li></ul><ul><li>Please enter your user's login password: </li></ul><ul><li>Welcome to my AIX system </li></ul><ul><li>##### ##### #### ##### # # #### ##### # #### # # </li></ul><ul><li># # # # # # # # # # # # # # # # ## # </li></ul><ul><li># # # # # # # # # # # # # # # # # # </li></ul><ul><li>##### ##### # # # # # # # # # # # # # # </li></ul><ul><li># # # # # # # # # # # # # # # # ## </li></ul><ul><li># # # #### ##### #### #### # # #### # # </li></ul>
  200. 200. AIX User Management <ul><li>To change the default GECOs, user’s real life information, use the following command: </li></ul><ul><li># finger justin </li></ul><ul><li>Login name: justin </li></ul><ul><li>Directory: /home/justin Shell: /usr/bin/ksh </li></ul><ul><li>No Plan. </li></ul><ul><li># passwd -f justin </li></ul><ul><li>justin's current gecos: </li></ul><ul><li>&quot;&quot; </li></ul><ul><li>Change (yes) or (no)? > yes </li></ul><ul><li>To?> Justin Richard Bleistein </li></ul><ul><li># finger justin </li></ul><ul><li>Login name: justin In real life: Justin Richard Bleistein </li></ul><ul><li>Directory: /home/justin Shell: /usr/bin/ksh </li></ul><ul><li>No Plan. </li></ul><ul><li># grep -i justin /etc/passwd </li></ul><ul><li>justin:*:202:1:Justin Richard Bleistein:/home/justin:/usr/bin/ksh </li></ul><ul><li># </li></ul>
  201. 201. AIX User Management <ul><li>As you may have noticed in the past motd discussion, the .hushlogin file has a period in front of it. That’s because this is a special file. Files with a period in front of them are not displayed with the ls command unless the –a argument is used with it, or the file is referenced directly. This is for regular non-root users. </li></ul><ul><li>$ id </li></ul><ul><li>uid=202(justin) gid=1(staff) </li></ul><ul><li>$ pwd </li></ul><ul><li>/home/justin </li></ul><ul><li>$ ls </li></ul><ul><li>$ ls -l </li></ul><ul><li>total 0 </li></ul><ul><li>$ touch .classified </li></ul><ul><li>$ ls </li></ul><ul><li>$ ls -l </li></ul><ul><li>total 0 </li></ul><ul><li>$ ls -a </li></ul><ul><li>. .. .classified .profile .sh_history </li></ul><ul><li>$ ls -la </li></ul><ul><li>total 16 </li></ul><ul><li>drwxr-xr-x 2 justin staff 256 Sep 5 23:10 . </li></ul><ul><li>drwxr-xr-x 5 bin bin 256 Sep 5 21:37 .. </li></ul><ul><li>-rw-r--r-- 1 justin staff 0 Sep 5 23:10 .classified </li></ul><ul><li>-rwxr----- 1 justin staff 254 Sep 5 21:37 .profile </li></ul><ul><li>-rw------- 1 justin staff 582 Sep 5 23:10 .sh_history </li></ul><ul><li>$ </li></ul>
  202. 202. AIX User Management <ul><li>You may also have noticed, that there are already two files in your home directory with periods in front of them. These are special files as well. They are put there automatically by the system, when the user was created. </li></ul><ul><li>.profile = This is a special file for the Korn shell. This is called an initialization file for the shell. Any code in this file will be executed automatically when you log into the system, starting this shell. </li></ul><ul><li>.sh_history = This file will keep a history of all of your command history while using this shell. This file is only valid, for your shell login session. </li></ul>
  203. 203. AIX User Management <ul><li>The file /etc/security/user. This file contains the default user attributes for new users, as well as individual user attributes. </li></ul><ul><li># ls -l /etc/security/user </li></ul><ul><li>-rw-r----- 1 root security 10551 Sep 6 00:51 /etc/security/user </li></ul><ul><li># </li></ul><ul><li>… </li></ul><ul><li>default: </li></ul><ul><li>admin = false </li></ul><ul><li>login = true </li></ul><ul><li>su = true </li></ul><ul><li>daemon = true </li></ul><ul><li>rlogin = true </li></ul><ul><li>sugroups = ALL </li></ul><ul><li>admgroups = </li></ul><ul><li>ttys = ALL </li></ul><ul><li>auth1 = SYSTEM </li></ul><ul><li>auth2 = NONE </li></ul><ul><li>tpath = nosak </li></ul><ul><li>umask = 022 </li></ul><ul><li>expires = 0 </li></ul><ul><li>SYSTEM = &quot;compat&quot; </li></ul><ul><li>logintimes = </li></ul><ul><li>pwdwarntime = 0 </li></ul><ul><li>account_locked = false </li></ul><ul><li>loginretries = 0 </li></ul><ul><li>… . </li></ul><ul><li>. </li></ul>
  204. 204. AIX User Management <ul><li>… </li></ul><ul><li>snapp: </li></ul><ul><li>admin = false </li></ul><ul><li>rlogin = false </li></ul><ul><li>su = false </li></ul><ul><li>SYSTEM = &quot;NONE&quot; </li></ul><ul><li>login = true </li></ul><ul><li>ttys = /dev/tty0 </li></ul><ul><li>registry = files </li></ul><ul><li>dce_export = false </li></ul><ul><li>nuucp: </li></ul><ul><li>admin = false </li></ul><ul><li>pconsole: </li></ul><ul><li>admin = true </li></ul><ul><li>login = false </li></ul><ul><li>
  1. Gostou de algum slide específico?

    Recortar slides é uma maneira fácil de colecionar informações para acessar mais tarde.

×