GithubHelp home page GithubHelp logo

pam_wifi's Introduction

pam_wifi

This PAM module authorizes the user given the system is connected to a set SSID. This SSID can be set in /etc/pam_wifi.conf.

Disclaimer:

Just in case you don't already know why not to use this, anyone can rename their access point to be the same as the set SSID to authenticate against. (given the attacker knows the SSID you are authenticating against)

The code is really bad, credits to my C proficiency.

This was made for educational purposes and I might refine it in the future.

Building

make build

Installing

sudo make install

Usage

Add the following line to your /etc/pam.d/system-auth:

auth       sufficient                  pam_wifi.so

Your final /etc/pam.d/system-auth might look like this:

-auth      [success=2 default=ignore]  pam_systemd_home.so
auth       sufficient                  pam_wifi.so
auth       [success=1 default=bad]     pam_unix.so          nullok
auth       [default=die]               pam_faillock.so      authfail

Set your desired SSID in /etc/pam_wifi.conf:

touch /etc/pam_wifi.conf
sudo echo "YOUR_SSID_HERE" > /etc/pam_wifi.conf

pam_wifi's People

Contributors

mradigen avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.