Archive for the ‘Security’ Category


# RHEL 5
# ------------------------------------------------------------------------------------------

# To force users to enter password in Single User mode, add following line to /etc/inittab:

~:S:respawn:/sbin/sulogin

# The changes to this file takes effect after a system reboot

# To make init re-read the /etc/inittab without rebooting the system, type the command

/sbin/init q



# RHEL 6
# ------------------------------------------------------------------------------------------

# Edit /etc/inittab and add "su:S:wait:/sbin/sulogin" before 'initdefault' line:

vi /etc/inittab
   [...]
   su:S:wait:/sbin/sulogin
   id:3:initdefault:

# Edit /etc/sysconfig/init and replace "SINGLE=/sbin/sushell"  with "SINGLE=/sbin/sulogin":

vi /etc/sysconfig/init
   [...]
   # Set to '/sbin/sulogin' to prompt for password on single-user mode
   # Set to '/sbin/sushell' otherwise
   SINGLE=/sbin/sulogin



# RHEL 7
# ------------------------------------------------------------------------------------------

# By default, Single User mode is password protected by the root password on RHEL 7:

cat /usr/lib/systemd/system/rescue.service
   [...]

   [Service]
   Environment=HOME=/root
   WorkingDirectory=/root
   ExecStartPre=-/bin/plymouth quit
   ExecStartPre=-/bin/echo -e 'Welcome to emergency mode! After logging in, type [...]
   ExecStart=-/bin/sh -c "/usr/sbin/sulogin; /usr/bin/systemctl --fail --no-block default" <---
   Type=idle
   StandardInput=tty-force
   StandardOutput=inherit
   StandardError=inherit
   KillMode=process
   IgnoreSIGPIPE=no
   SendSIGHUP=yes

Encrypt a ZIP File Using password

Screenshot_66

Screenshot_67

Screenshot_68

A Better Approach –>See that you have to type the password at the command line to zip the files which can easily be seen in the command line history.

Screenshot_69

Screenshot_71


Set Password

Screenshot_51

Screenshot_52

Screenshot_53

 

Reset  Password

Screenshot_54


Screenshot_14

 

Screenshot_15

 

Screenshot_16

 

Screenshot_17

 

Screenshot_18


Screenshot_125

 

Screenshot_126

 

Screenshot_127

 

Screenshot_128

 

Screenshot_129

 

Screenshot_130

 

Screenshot_131

 

Screenshot_132


Screenshot_118

 

Screenshot_119

 

Screenshot_120

 

Screenshot_121

 

Screenshot_122

 

Screenshot_123

 

Screenshot_124


Screenshot_107

 

Screenshot_108

 

Screenshot_109

 

Screenshot_110

 

Screenshot_111

 

Screenshot_112

 

Screenshot_113

 

Screenshot_114

 

Screenshot_115

 

Screenshot_116

 

Screenshot_117