Full width home advertisement

Post Page Advertisement [Top]





How to Change CentOs 6.3 keyboard ( from "qwerty" ) to "azerty" permanently :
   1.edit the file /etc/sysconfig/keyboard .
   2.Configure the KEYTABLE et LAYOUT to "fr"  , then Crtl+S  ( to save ) and exit .
   3. type the command : system-config-keyboard fr







Account: (all the account info is stored in the /etc/passwd )

  • Username (login ID ) 
  • UID ( User ID) this is a unique number
  • Default Group 
  • Comments 
  • Home directory location
  • Shell ( execute when user logs in ) 

--> the format of the "/etc/passwd" :
userName : password : UID : GID : comments : home_directory : shell
( example :   joe:x:1000:1000:Joe Henderson:/home/joe:/bin/bash )


in this example of the root account :   root:x:0:0:root:/root:/bin/bash     
( x : encrypted password stored in the "/etc/shadow" file )   

Custom for usenames < 8 characters : 
(linux supports usernames up to 32 char length ; if username is longer than 8 char => UID is displayed in place of the username )
                                                                                                        
|       usernames:
|    - less than 8 char by convention
|    - case-sensitive
|    - in lowerCase letters ( convention )
|    - Numbers are allowed
|    - Not use special characters



Passwords are stored in  /etc/shadow : 

passwords used to be stored in /etc/passwd    →→ readabe by everyone.
Now encrypted passwords are stored in   /etc/shadow  →→ readable by root.

UIDs (are unique numbers) :

- Root account is always UID 0 .
- System account have UIDs < 1000 →→ this is configured in /etc/login.defs

GIDs :
- GID listed in the  /etc/passwd in the account's default group



Chapter 2 : User & Group

#  useradd  < options >  username

          [-p password   ]
          [-u UID   ]
          [-g group_principal(par GID ou nom_grp)   ]
          [-G group_secondaire1,grp_sec2,...  ]
          [-c comment     ]
          [-d home_dir (usually /home/user-name)    ]
          [-s shell     ]
          [-m create_home_dir  ]
          [- k repertoire_/etc/skell    ]
          [-D print or change_DefaultValue_of_useradd_command   ]


  $ passwd < option > username

          [ -l lock_Account ( ! before Crpyted-passwd)
          [ -u unlock (-f force_unlock_for_Acc with no passwd
          [ -d delete_password
          [ -n  <j>  Duré_vie(Min)_password
          [ -x  <j>  Duré_vie(Max)_password
          [ -w <j>  Numb_Days_before_warning
          [ -i   <j>   inactive_Days (Nbr_Days after password expire taht the Acc will be Disactivated.
          [ -S Account_status


   # chage < option > username
( Champ 8 )
          [ -E       set_Acc_ExpireDate
          [ -M     Max_Days_before_passwrd_change
          [ -m     Min_Days_before_passwrd_change
          [ -W     Expiration_Warning_Days
          [ -d      set_Last_Day_of password changement.


  $ usermod < option > username 
         
          [ -g Change_PrimaryGroup
          [ -G Change_SecondaryGroup
          [ -L lock_the_userAcc
          [ -l <New_login>
          [ -e <n>
          [ -u <UID> change UID
          [ -U unock_the_userAcc
          [ -m move_home_dir to New location (implique presence de -d to presice Newdir)


    #userdel (home_dir not removed)
    #userdel -r   ( to remove home_dir )




                       /etc/group
   #  groupadd 
          [ -g <preciser_GID>
   
  #  groups <username>  ( list_Secondary_Groups_of_username)


  #  groupmod < option > Group_name
          [ -n <nom>
          [ -g <GID>
          [ -A <username> add specific user to the group
          [ -R <username>  delete Specific user from group ]

  #  groupdel groupname   (Doesn't Delete if it's the Primary_Group of a user )
 
(/etc/gshadow if it's definied in compilation )
 #  gpasswd < option > 
          [ -A  : definit les Admins de Group
         [ -M : definit les membres
         [-r delete_Group_password
             Group Admins can add or delete  users :
         [ -a <username> <group>
         [ -d <username> <group>


   #   chown  <username>     <file_name>   
   #   chgrp    <Groupname>  <file_name>



+ Ressources : Managing User Account in Linux




Chapter 3 :Compiler & installer des programmes

Archive : ensemble de fichiers qui ont une relation et stockés dans un fichier unique.

tar < function > < option -fv >
[ -c create new archive
[-t list files in tar
[-x extract tar
< -f  specify tar name
<-v verbose

exemples:
tar -cvf monbackup.tar ~
tar -cvf usr.tar /usr
tar -tvf monbackup.tar
tar -xvf monbackup.tar

Compression :  Supprime redondances = Elimine les infos inutiles :
( 30 lettres X ) = ( 30*X )  occupe 4 Octets



Click to see videos :


4 commentaires:

  1. https://onedrive.live.com/embed?cid=551D097EFE0DA702&resid=551D097EFE0DA702%214498&authkey=AAHWLVuznxuvdZ0

    RépondreSupprimer
  2. 1. To access terminal as admin in centOs :
    #su -
    #EnterYourPassword

    2. To access terminal as admin in Ubuntu 20.04 :
    #sudo -s
    #EnterYourPassword

    https://i.imgur.com/WFt5dcw.png

    RépondreSupprimer

Bottom Ad [Post Page]

| Designed by MABT