Saturday, January 2, 2016

RHEL7 - Comparison of the service Utility with systemctl





Comparison of the service Utility with systemctl
servicesystemctlDescription
service name start
systemctl start name.service
Starts a service.
service name stop
systemctl stop name.service
Stops a service.
service name restart
systemctl restart name.service
Restarts a service.
service name condrestart
systemctl try-restart name.service
Restarts a service only if it is running.
service name reload
systemctl reload name.service
Reloads configuration.
service name status
systemctl status name.service
systemctl is-active name.service
Checks if a service is running.
service --status-all
systemctl list-units --type service --all
Displays the status of all services.

source: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/sect-Managing_Services_with_systemd-Services.html


Comparison of the chkconfig Utility with systemctl
chkconfigsystemctlDescription
chkconfig name on
systemctl enable name.service
Enables a service.
chkconfig name off
systemctl disable name.service
Disables a service.
chkconfig --list name
systemctl status name.service
systemctl is-enabled name.service
Checks if a service is enabled.
chkconfig --list
systemctl list-unit-files --type service
Lists all services and checks if they are enabled.
chkconfig --list
systemctl list-dependencies --after
Lists services that are ordered to start before the specified unit.
chkconfig --list
systemctl list-dependencies --before
Lists services that are ordered to start after the specified unit.



RHEL7:- How to change graphical to multi user runlevel on Centos 7


1. Get the current run level
[root@new-host-4 ~]# runlevel
N 5
[root@new-host-4 ~]#


2. Get the default run level
[root@new-host-4 ~]# systemctl get-default
graphical.target

3. List the targets

[root@new-host-4 ~]# systemctl list-units --type=target
UNIT                   LOAD   ACTIVE SUB    DESCRIPTION
basic.target           loaded active active Basic System
cryptsetup.target      loaded active active Encrypted Volumes
getty.target           loaded active active Login Prompts
graphical.target       loaded active active Graphical Interface
local-fs-pre.target    loaded active active Local File Systems (Pre)
local-fs.target        loaded active active Local File Systems
multi-user.target      loaded active active Multi-User System
network-online.target  loaded active active Network is Online
network.target         loaded active active Network
nfs-client.target      loaded active active NFS client services
nss-user-lookup.target loaded active active User and Group Name Lookups
paths.target           loaded active active Paths
remote-fs-pre.target   loaded active active Remote File Systems (Pre)
remote-fs.target       loaded active active Remote File Systems
slices.target          loaded active active Slices
sockets.target         loaded active active Sockets
sound.target           loaded active active Sound Card
swap.target            loaded active active Swap
sysinit.target         loaded active active System Initialization
timers.target          loaded active active Timers

LOAD   = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB    = The low-level unit activation state, values depend on unit type.

20 loaded units listed. Pass --all to see loaded but inactive units, too.
To show all installed unit files use 'systemctl list-unit-files'.

4. Set the runlevel you like
[root@new-host-4 ~]# systemctl set-default multi-user.target
Removed symlink /etc/systemd/system/default.target.
Created symlink from /etc/systemd/system/default.target to /usr/lib/systemd/system/multi-user.target.
[root@new-host-4 ~]#


5. Verify your runlevel

[root@new-host-4 ~]# systemctl get-default
multi-user.target


Monday, November 23, 2015

RHEL7.2 - Installation

https://access.redhat.com/products/red-hat-enterprise-linux#getstarted

INSTRUCTIONS

  1. 1

    Start the system from the bootable disk and select "Install Red Hat Enterprise Linux 7.2."

  2. 2

    Customize installation options:

    • Adjust Date & Time, Keyboard, and Language Support preferences underLocalization.
    • Modify Installation Source, Software Selection, and Network Configuration options under Software.
    • Configure any additional options forStorage.
    • Click Begin Installation to start the process.
  3. 3

    Set a root password

  4. 4

    When the installation process completes, click Reboot.

    Take a break. Installing the operating system Red Hat Enterprise Linux could take the majority of the estimated 30-45 minutes.
  5. 5

    Register your system to receive updates and install additional products. 




Thursday, November 19, 2015

Windows 7 - The task image is corrupted or has been tampered with

I tried to create a job to shutdown MY pc one hour from now, I got the error :- The task image is corrupted or has been tampered with

Here is the solution, that worked with me.

Recreate the task by deleting the corrupted task
a. Click Start, type task scheduler and hit enter.
b. In the left pane, click on "Task scheduler library" and select the backup task in the middle pane and delete it.
If you’ve trouble finding the corrupted task, follow the steps mentioned below.
     i.       Click on Start; in the start search type cmd. In the programs list, right click on cmd and run as administrator.
    ii.       Now execute the following command.
schtasks /query | findstr /i


Source: http://www.thewindowsclub.com/schedule-shutdown-restarts-windows-7-task-schedular

To schedule the shutdown,

To make your computer shutdown at a particular time, 

type taskschd.msc is start search and hit Enter to open the Task Scheduler
In the right panel, click on Create Basic Task. 
Give it name and a description if you wish and click Next. 
When asked When do you want the task to start, select One time.
Select the Start date and time.
Clicking Next will bring you to the Action page. Here select Start a program and click on Next.
Here type shutdown on the Program/script space and –s –f –t 0 in the Add arguments box. If you want the shutdown to commence after say 60 sec, type 60 instead of 0 here.

Click Next to review all and finally click Finish. Your computer will shutdown at the designated day and time.

source: http://www.thewindowsclub.com/schedule-shutdown-restarts-windows-7-task-schedular


Saturday, November 14, 2015

Windows:- Windows 7 upgrade to Windows 10

I upgraded windows 7 to Windows 10. It took about about 3 hours to upgrade. I thought its going to be very slow. Finally, its completed and upon reboot, it was really slow. After clocking on Internet Explorer, I can go for coffee and comeback, its still loading. Super slow.

Finally, I decided to backout to windows 7. Here are the steps how I backout the system.

=> Click on start menu and click on Settings
=> Click on Update & Security 
=> There are couple of options here. You can reinstall Windows 10 or you can reset. 
Since I planned to go back to Windows 7, I click on Recovery.
=> You will see an option to Go back to Windows 7.
=> Click on Get started to go back to Windows 7.

Finally, I am happy with my old Windows 7. Its way faster than Windows 10.


Monday, October 19, 2015

Something to know about -


Something to know about -

Hashing provides integrity for digital signatures and other data. A digital signature is a hash of the message encrypted with the sender’s private key

A digital signature is an encrypted hash of a message. The sender’s private
key encrypts the hash of the message to create the digital signature. The
recipient decrypts the hash with the sender’s public key. If successful, it
provides authentication, non-repudiation, and integrity. Authentication
identifies the sender. Integrity verifies the message has not been modified.
Non-repudiation prevents senders from later denying they sent an email.


The recipient’s public key encrypts when encrypting an email message and
the recipient uses the recipient’s private key to decrypt an encrypted email
message.



Time Offsets

Windows: 64-bit time stamp

- Number of 100-nanosecond intervals since
- January 1, 1601 00:00:00 GMT
- This stops working in 58,000 years

Unix: 32-bit time stamp
- Number of seconds since January 1, 1970 00:00:00 GMT
- This stops working on Tuesday, January 19, 2038 at 3:14:07 GMT


Two popular hashing algorithms used to verify integrity are MD5 and SHA.
HMAC verifies both the integrity and authenticity of a message with the use
of a shared secret. Other protocols such as IPsec and TLS use HMAC-MD5
and HMAC-SHA1.

IPsec must use HMAC for authentication and integrity. It can use either AES or 3DES for
encryption with ESP. When IPsec uses ESP, it encrypts the entire packet,
including the original IP header, and creates an additional IP header.



A VLAN, or virtual local-area network, was originally designed to decrease broadcast traffic on the data link layer. However, if implemented properly, it can also reduce the likelihood of having information compromised by network sniffers. It does both of these by compartmentalizing the network, usually by MAC address. This should not be confused with subnetting, which compartmentalizes the network by IP address on the network layer.

Banner grabbing is a technique used to find out information about web servers, FTP servers, and mail servers.  A VPN, or virtual private network, enables the secure connection of remote users to your network.
RADIUS authenticates users to a network and is sometimes used with a VPN.





No comments:

Post a Comment