Network Configuration
The ifconfig command is used to view the current network configuration for ethernet cards and iwconfig displays the network configuration for wireless cards.
ifconfig [OPTIONS]
iwconfig [OPTIONS]
Because this is the output from a Virtual Machine the ethernet is called enp0s3, on hardware machines is eth0.
The lo (loopback) interface is a software device used by the operating system when sending network data to itself, used for testing, troubleshooting and debugging mostly.
The virbr0 is also a interface created by the Virtual Machine and connects the virtual network card with the local network card that is configured on the system on which the VM is installed, you won’t see it if you do not have a VM software installed.
The ifconfig and iwconfig can be used to make temporary changes in the network interfaces.
Processes
Running any kind of application/command/game and so on, creates something that is called process. The process runs with the privileges with the user who created it, this way the process is controlled and limited to run only under certain capabilities. The user who creates a process is the owner if it and it can not be controlled by other users with same or lower privileges. In our case, if the sysadmin user runs a process, another user with same or lower privilege level, can not control it but it can be controlled by the root user. The ps command is used to view the processes.
ps [OPTIONS]
The default output for ps command includes 4 columns and displays only the processes for the current terminal:
PID: process identifier, is a unique ID used to identify each process and to control it;
TTY: terminal name where the process is running, is used to identify a process if there are more that have same name;
TIME: total amount of processor time used by the process;
CMD: command that started the process;
To view the processes from the entire system ps -e command must be executed and ps -f displays more details for each process. The two commands above can be combined into one: ps -ef.
Updating the passwords
The passwd command is used to change the password. The users can only change their own password and the root user can change the password of any user.
passwd [OPTIONS] [USER]
If the passwd command is used without arguments, the terminal automatically starts the procedure for changing the password for current user.
If you want to see the details about the status of the password you must follow the following steps:
su root
passwd -S sysadmin
1st column: username – sysadmin
2nd column: password status – P = usable password; L = locked password; NP = no password;
3rd column: date – when the password was last change (current password was never changed = 1969-12-30)
4th column: minimum – the minimum number of days until the user can change the password
5th column: maximum – the maximum number of days until the password will expire
6th column: warn – the number of days before the password will expire and the user will be warned
7th column: inactive – the number of days after the password will expire and the user will remain active
8th column: info – details about the password status and encryption