Guide To Linux - Apurva Gaglani - E-Book

Guide To Linux E-Book

Apurva Gaglani

0,0
0,99 €

oder
-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.
Mehr erfahren.
Beschreibung

Although not much in favour of technology, I believe this book will help all those having difficulties in getting around Linux. The Linux commands used in this book having all been actually tested on the Red Hat Linux (RHEL 4) and should work for the later editions of Linux too.

Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:

EPUB

Veröffentlichungsjahr: 2014

Bewertungen
0,0
0
0
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



Apurva Gaglani

Guide To Linux

The book is dedicated to all the Linux users across the world as well as those who are new to Linux.BookRix GmbH & Co. KG81371 Munich

Users, Groups, Passwords

 

A]

To check the users that have been created on the system:

=> cat /etc/passwd

Columns in the /etc/passwd ->

a) username

b) placeholder for passwd

c) user id (uid)

d) group id (gid)

e) comment or description

f) home directory

g) login shell

 

B]

To check the groups existing on the system:

=> cat /etc/group (contains groupname and gid)

 

C]

The file that contains encrypted passwords:

=> /etc/shadow

The columns of /etc/shadow are mentioned in "man 5 shadow".

 

D]

The file that has the password policy settings, the min. and max.

UID/GID setting for users and groups that are created, settings

to prevent a user's home directory from being created.

=> /etc/login.defs

 

E]

To see the current password policy for a user:

=> chage -l (e.g chage -l abg)

To change the password policy for a user:

=> chage (e.g. chage abg)

 

F] Troubleshooting:

What if the /etc/shadow file gets deleted?

You won't be able to login, so what is the solution?

=> Boot into runlevel 1 (here password is not reqd. to login)

=> cd /etc

=> pwconv passwd (The /etc/shadow file will get created)

(Although the /etc/shadow file is created, the passwords won't

work)

=> Reset the root password

 

------------------------------------------------------------------

 

 

 

 

 

 

 

Login Shells and Startup Scripts

 

To see the different available shells:

=> cat /etc/shells

 

------------------------------------------------------------------

 

Files that print Pre-login Messages before the login prompt

1. /etc/motd (motd => message of the day)

2. /etc/issue

 

------------------------------------------------------------------

 

Order of Execution of Startup Scripts

A Login shell first calls the /etc/profile script. The actual

order is as follows:

1. /etc/profile

2. /etc/profile.d where profile.d is a directory

3. ~/.bash_profile

4. ~/.bashrc

5. /etc/bashrc

Almost all the variables that can be seen using "set" and "env"

commands are set in '.bash_profile' and not '.bashrc'

Only aliases are set in '.bashrc'

 

------------------------------------------------------------------

 

 

The kill command signals

 

To see a list of signals and their values that are to be used with

the "kill" command:

=> man 7 signal

 

 

The kernel

 

To dynamically make changes to the kernel:

1. /etc/sysctl.conf

2. sysctl -p (to update) (sysctl -e for errors)

NB:  a) For a complete list of sysctl parameters, use "sysctl -a".

       b) Changes to the /proc filesystem are temporary & if you want them to persist 

           across reboots, put an entry in /etc/sysctl.conf

       c) Also, you can check /proc/sys/net ... and its sub-directories.

 

 

To see the kernel version:

1. ls /lib/modules (modules is a directory)

2. cat /proc/version

3. uname -r

 

------------------------------------------------------------------