Archive for the ‘Terminal Masters’ Category

Jssh Example

Posted: December 18, 2014 in Terminal Masters

HealthCheckGPS

 

Changing Hosts File On Linux Systems ::

If you have Linux PCs on your home network and want to access your Wikidot install, you need to edit your hosts file to include the specific site(s) you want to access. You’ll need to know the internal IP address of your Wikidot server (192.168.0.103 is used in the example below). On Linux PCs, the hosts file is located in the /etc/ folder. The file name is simply hosts (no file extension). You can edit the file using gedit, nano or any other text editor.

127.0.0.1 localhost

# add entries for your local wikidot install
# here's some examples:
# main wikidot sites after initial install
192.168.0.103 www.mywikidot.com template-en.mywikidot.com profiles.mywikidot.com
# new sites you create
192.168.0.103 test.mywikidot.com anything.mywikidot.com myblog.mywikidot.com
# new tempaltes you create
192.168.0.103 template-blog.mywikidot.com
# for https (this may not be necessary)
192.168.0.103 https://www.mywikidot.com

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

 

  • Edit the hosts file on your system. The hosts file is usually found in

    /etc/hosts
  • Add this entry to the Hosts file:
    173.194.38.152     http://www.google.com
  • Now make sure this file is used for host name lookups. This is done in two files. First is:
    /etc/host.conf

    This file should have at least the line shown below:

    order hosts,bind

    That has host lookups use the hosts file before doing a DNS query with bind.

  • The next file is:
    /etc/nsswitch.conf

    Recent tests indicate that this file is required in order for the pserver to use the entry in /etc/hosts. The nsswitch.conf file should have this line for the hosts configuration:

    hosts:      files nisplus nis dns

    There will probably already be a similar line in your version of this file. Just make sure “files” comes before whatever other methods are listed.

  • There is no need to reboot your system. Just restart your palace pservers.
  • Start up your palace.
  • It should now “register” with the Live Directory at google.com.

    NOTE: The above configuration instructions were tested with a linux 4.5.1 Palace server, and should also work with the linux 4.4.1 server. The 4.3.2 linux server did not respond to the above configuration when tested. Older versions were not tested Though It will Work With All.

Hey Friends !!

This Post is for All Red hat Linux Distribution users, Who Have Lost Thier Root  password or Who Want Privileged Access For a Physically Accessible System !!

The Scenario is That you don’t know the root password. ::

So Here We Begin

To Remove root password in Red Hat follow these instructions ::

When System Successfully boot, it will ask for username and password. But you don’t know the root’s password. To change the root password you need to boot the system into single user mode. You can pass the some of the important kernel arguments from the boot loader if your target system’s Boot loader is unprotected.

Firstly Reboot system with alt + ctrl + del key combinations
Press space bar on boot loader screen

remove root password

This will drop you in OS selection screen
Select linux (If you have multibooting then select linux)

From grub boot loader screen select kernel parameter line and press “E”

remove root password

Select the JLine starting from kernel /vmlinuz…
remove root password in linux

 

In kernel editing mode press space bar and write s in the end of line just after the rhgb quiet and press enter key that will bring in grub bootloader screen
remove root password

On grub boot loader screen press b

remove root password in linux

 

This change will tell to boot system in single user mode.
After loading essential modal kernel will drop in rescue mode with root prompt
remove root password

 

now run passwd command to reset root password
and init 5 command to run system in graphic mode or you can just reboot system to on its default run level
remove root password

++++++++++++++++++By Ankit Pandey +++++++++++++++++++++

How do I create create a new Linux user account ?

What are command line options for adding a user?

To create a new user account under any Linux distribution use the command called “useradd” .  The system administrator is responsible for creating account. Login as root user (or use sudo command).

useradd Command Syntax

# useradd [options] {username}

Depending on command line options, the useradd command will update system files (/etc/passwd and /etc/shadow file with password) and may also create the new user’s home directory and copy initial files.

Linux add a New user “test”

Type the command as follows:

#useradd test
Setting a password for test:

#passwd test
Without password user account will be in locked status. To unlock the account, you need to use above passwd command. Use passwd command to assign a password.

Set account disable date

You can set date for the account to be disabled in the format YYYY-MM-DD with -e option while creating account itself:
#useradd -e {yyyy-mm-dd} {username}
#useradd -e 2008-12-31 test

Set default password expiry

The -f {days} option set number of days after the password expires until the account is disabled. (If 0 is specified, the account is disabled immediately after the password expires. If -1 is specified, the account is not be disabled after the password expires.)
useradd -f {days} {username}
useradd -e 2009-12-31 -f 30 test

Hey Friends !!! After Installing any linux Distribution The First thing We should Do is to Update The Repositories And Upgrading the Existing Packages. This can be done By opening The Terminal in root mode and giving commands for update and upgrade.It can be done as Follows ::

# sudo su

# apt-get update

# apt-get upgrade

How To install A package in ubuntu or any other Debian Distributions ??

A debian package can easily be installed to a system by following normal installation procedure.

If the system is online and it’s repositories contain the package  . Open the terminal in root mode and insert following commands ::

#apt-get install package-name

If  The system is offline then Download the package file from internet and bring to the system where it has to be installed ::

The Downloaded package may be in .deb extension or a tar archive.For installation of .deb Files, just copy them to Home directory of current user and type the following ::

#ls -l              [To check if file exists]

#dpkg  -i  package_file_name.deb

For any dependency error you can correct the error by installing the dependent packages alone or if your system is online then using following command ::

#apt-get -f  install

#apt-get upgrade

++++++++++++++++++++By Ankit Pandey++++++++