Giter Site home page Giter Site logo

pam_trimspaces's Introduction

pam_trimspaces

Build Status

PAM module to trim spaces on both sides of the username. This is useful especially in login GUIs used by the general computer-illiterate public.

There are some relevant tickets suggesting adding this functionality to lightdm or other areas, but none so far have significant traction.

Installation

Either install the Debian package, or somehow plop the .so file into place. Then add to your PAM config file:

--- /etc/pam.d/lightdm.orig
+++ /etc/pam.d/lightdm
@@ -1,5 +1,8 @@
 #%PAM-1.0

+# Strip leading and trailing whitespace from username
+auth      requisite pam_trimspaces.so
+
 # Block login if they are globally disabled
 auth      requisite pam_nologin.so

You can add this to whatever PAM service chain you like, but we choose only to use it for lightdm (it's much harder to e.g. accidentally log in with spaces in your name via SSH).

Building

Building the .so directly

  • Run make.

Building the Debian package using Docker

  • Run package_{dist}, e.g. package_stretch.

Building the Debian package locally

  • Use the regular packaging commands to get the desired output. For example, to build only a binary package and skip signing, try debuild -us -uc -b.

pam_trimspaces's People

Contributors

chriskuehl avatar jvperrin avatar kpengboy avatar bzh-bzh avatar cg505 avatar

Watchers

James Cloos 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.