Skip to content

Set of bash scripts that can be used to login and logout from NITC Network in Command Line Interface.

License

Notifications You must be signed in to change notification settings

vishnuajith/nitc-auth-cli

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

80 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nitc-auth-CLI

MIT License

These scripts can be used for logging in and out of NITC Network from the CLI itself, without any need for GUI. It has been made sure that the script uses only bare-minimum external programs which is commonly available in any minimal Linux-based systems, so that it can be used in various headless systems such as Servers, Raspberry-pi..etc.

File Description
login.sh This script will prompt the user for username and password, and will give appropriate status feedback for logging into the network.
logout.sh This script is responsible for logging you out, it will logout from the network and give appropriate feedback for logout. It is highly recommended to use this script with the login script only.
log_file This file will be generated by login.sh. This file stores the information about current session's key as well as the details of the network, this is used by the logout script.

Dependencies: wget, curl, sed

Make sure you have the dependencies before using the script if not run sudo apt install wget curl sed.

How to Use


Method 1 Without Installation:
The codes have to be run from its directory.
steps are :

  1. Go to the Directory containing the files
  2. Open terminal in the directory use command ./login.sh. Enter your Username and password as promted. Firewall Authentication Successful is returned if login is succesfull.
  3. To Logout ocpen terminal in the directory use command ./logout.sh. Logout Successful is returned if logout is succesfull.

Method 2 By Installing:
The program is added into bashrc and can be used from terminal. As of now the install script supports bash and zsh shells. Steps:

  1. Go to the Directory containing the files , Run sudo ./install.sh (The sudo previllege is mandatory). Returns Installation complete if successfull. The files are installed in /opt/nitc-auth-cli .
  2. To logout Open terminal use command nitc-logout.To see log_file use command nitc-logfile.

Troubleshoot


If you are not able run the scripts, you can use the command

chmod +x <script-name>.sh

This will change the permission of the script files, and will allow you to run the scripts

About

Set of bash scripts that can be used to login and logout from NITC Network in Command Line Interface.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 100.0%