Powered by Blogger.
Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

RHCSA Study Sessions -III


user accounts management via LDAP
like we can get account info from remote server on which accounts are configured
ldaps://<ip of our ldap server>

Basic file permissions:
Owner, Group, Others
OGO
rwx-r-x---x
umask , default file permissions


One very handy command is lsattr. List attribute command, list the immune bit attirbutes ( like a file is immune to deletion etc)


[root@localhost src]# lsattr
----i--------e- ./index.html
-------------e- ./asterisk-1.8-current.tar.gz.1
-------------e- ./jitsi-2.4-latest.x86_64.rpm
-------------e- ./asterisk-1.8-current.tar.gz
-------------e- ./sipp-3.3
-------------e- ./debug
-------------e- ./sipp_packages
-------------e- ./sipp-3.2-Linux_RHEL5U2.tar.gz
-------------e- ./asterisk-1.8.25.0
-------------e- ./kernels
-------------e- ./sipp-3.3.tar.gz

here all files are prone to delete in my current src directory.

chattr command is used to apply or remove the immunity bit. by using chattr + <file-name or path>  : Attribute is applied
chattr - <file-name or path>  : Attribute is removed


its quite helpful, if we want to protect some file from accidental deletion or for high protection.

Directory setup for group collaboration.
mkdir /home/research

sgid bit - set group id bit , is for the setting of a directory for a group, to be used by that group
ugid bit

Some command history , as its helpful to view what commands i have applied :)

 592  chown shah:research /tmp/research/
  593  ls
  594  ls -l
  595  ls -ld
  596  ls -ld research
  597  ls -ld /home/
  598  # sgid
  599  ls -l resear*
  600  ls -ld resear*
  601  chmod 2070 research/
  602  ls -ld resear*
  603  groups
  604  cd /home/
  605  ls
  606  su shah-re
  607  history

Linux Kernel Part 1: Study Notes


Monolithic and modular kernal update

source rpm and binary rpm ( for our basic needs binary rpms are great, source rpms are good if we want to tinker with the system changes)

smp : symetric multiprocessor

Kernal update and installation
we need to go to the redhad website, to download the kernel, once the kernel is downloaded

cat /proc/cpuinfo


md5sum : to check the files wether they are being tamprered with or not.
md5 checksum is really helpful in tracing out if the file is safe to us or not, and its very good to use , in order to avoid using any harmful software.


cd /boot

cat /etc/grub.conf : to check the kernel loading parameters in the grub loader

uname -r : to check the kernel version

Resetting root password on Linux


Suppose, if you have forgotten your linux root password. You seems to be in a little trouble, but dont worry, use below steps to recover your linux password with a few clicks:

1. During boot, highlight the installation for which you want to change the root password. Once the installation is highlighted, press a and Enter, a = append.

2. You will be taken to a prompt, that will look like this:

  
Press Enter once more, and you will see after some processing a prompt like:

sh-2.05b#
 
Here on this prompt you can use all basic commands of Linux. Just type your new password here by using passwd root command and enjoy :)
 
I hope this article was helpful to you guys. See you with some more stuff in future.