What is process in Linux?
ANSWER
In linux operating system, the
term “process” is used to represent a running program (a set of machine codes
and instructions stored in an executable image on the disk). They are also
called running applications. If you have two terminal programs running on your
system, then you have two processes. Each terminal window runs a shell and each
running shell is another process on its own.
Every
program in linux is identified by its own unique process identifier (unique
ID). Process ID is a 16 bit number that linux assigns to every process created.
The Process ID of a process cannot be changed but when a process stops, linux
can assign the same process ID to a new process. Every process except Zombie
process (a terminated process that hadn’t been cleaned up which has the PID
equals to 0) has a parent process, thereby creating a parent- child
relationship between the processes. Zombie is created by the operating system
while booting. When the parent process terminates before the children, the
operating system gives the children a new parent (the system process or the init
process) with the Parent Identifier set to 1. All processes are recorded in
the process table.
What is super user and explain
its rules?
ANSWER
Super user or root user is special
user account in linux that has the right or privilege to write an entry that is
topmost in the file system hierarchy called root. The super user has
the right to access to all hardware, software, commands and files on the system;
it can install, uninstall and configure any software. He has a full/unlimited
access to the system.
Super/root
user Roles
ü User management:The super user has the right tocreate
a user account and groups into the system, to modify and delete a user or
group, to maintain the user accounts, to set the password aging policy and to
give privileges to clients/groups.
ü Performs Backup: Using any device of his choice e.g.
CD/DVD ROMS, hard drive, the root user secures data (documents) by backing them
up to avoid losing them in case of hardware/ software failure etc.
ü Service Management: He is responsible for
controlling software installation and upgrades. He also He also configures
network file system.
ü System Maintenance:The super user maintains the
system by making good documentation and description of tasks and notifying the
users of any change made on the system after or in advance.
Ftp server for
downloading and uploading files
FTP (File Transfer Protocol)
server is a computer running FTP software also known as FTP deamon that allows
you to transfer files to and from a remote network site. It works with
Transmission Control Protocol (TCP). File Transfer Protocol is the most popular
protocol for file transfer (download and upload) from one system to another
system.
First of all
before uploading or downloading any file, you are required to first connect to
the site. My description on how to upload and download files shall be based on
commands. When you connect to ftp server, you will be asked to login. In this
case, you have to login as anonymous of ftp to get to the public archive.
ü After you have used your email address as password, you will be presented with“Guest login ok, send your complete e-mail address as password”.
ü When you login successfully, information like this will be presented to you:“Remote system type is UNIX.Using binary mode to transfer files.ftp>“
Now you have logged in:
FTP DOWNLOAD
ü Now perform an “ls” and find the files you want to download. Let’s say “linux-2.2.13.tar.gz’” and you type it. Then you will see:
“local: linux-2.2.13.tar.gz remote: linux-2.2.13.tar.gz
200 PORT command successful.
150 Opening BINARY mode data connection for linux-2.2.13.tar.gz (15079540
bytes)
The above cmd running shows that ftp has started saving remote files
To download more than one file at a time, we use “mget” command, e.g.mget linux. The command prompts you for each file before you download.
FTP UPLOAD
Here you can upload any software that you have written. For instance, you want to upload it to MelaLab for them to include it in their Linux software archive. Most public FTP servers usually have directory named “uploads”. So to upload, you have to change to “uploads” directory and then type the “put” command, e.g.“ftp> put foo.tar.gz”. Then it will run successfully.
The “put” command works the same way as the “get” command. So to upload multiple files, we use the “mput ” command.
How to break password using
kernel editing
ANSWER
The
following are the steps:
BOOTING
WITH SuSE
On the boot screen displaying available kernel choices:
ü
In the “boot options” text box, type 1
to start a run level 1 and press ENTER
and the progress message will display and then init will finish up, leaving you
at a shell prompt. At the end, it asks for a password.
ü
Now, in the boot options control type “init=/bin/bash” to shortstop the init
boot process.
ü
Press ENTER so that the SuSE will boot
as expected and the progress message will display.
ü
Manually remount the root partition to
be read and write by typing in the command: “#
mount -o remount,rw /”.
ü
Now, you will need to edit the menu.1
file during boot. In order to get GRUB command, press ESCAPE when presented
with the list of SuSE kernels.
Note: You will get a
warning showing that you are leaving Graphic User Interface and you will be
asked to confirm your choice.
ü
Press OK and the list of kernel choices
will be displayed.
ü
You can now use the up and down arrows
to select which kernel u want e.g “linux” and the press “e”.
ü
Make your edits in single line editing
mode and then press ENTER to accept
your changes.
ü
A new screen will be displayed. Type
“b” to continue booting.
ü
DONE
OR
ü
At the GRUB menu, where it says “press
any key to enter the menu”, press ESCAPE.
ü
Next, press “e” to edit the first kernel option.
ü
Using the arrow keys, highlight the kernel line and then press
“e”.
ü
On ‘grub edit>’ append ‘init=/bin/sh‘
line on the next screen, press ENTER.
Now to reset the
password:
Ø
mount the “mount/proc” file system.
Ø
Remount the root file system in read
and write mode (mount -n -o remount,rw /)
Ø
edit /etc/shadow and replace the second field of
root’s entry with a known password hash
Ø
edit /etc/shadow and remove the second field of
root’s entry and the root password will be reset to a blank value.
Ø
Mount the /usr partition and run /usr/bin/passwd to reset root’s
password.
Ø
Issue the synccommandto
removeall uncommitted writes to disk.
Ø
Now, you have to shut down the system manually.
(/sbin/shutdown,
/sbin/init 0, and /sbin/reboot).
See Also What is DORA, What is Foward Zone
ConversionConversion EmoticonEmoticon