Skip to content

Pam module to authenticate to nextcloud/owncloud server

License

Notifications You must be signed in to change notification settings

nexhero/pam_nextcloud

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PAM__NEXTCLOUD

The pam_nextcloud is a Pluggable Authenication Module (PAM) module used to verify a user against a cloud service’s database. The cloud service supported be Nextcloud or Owncloud [not tested]. The idea is simple, convert any Linux distribution into a cloud OS, something similar to Chrome OS or Chromium OS, but not using any Google services.-

Motivation

I started this project because I would like to use something similar to Chrome OS without Google Drive and that is fully opensource.

Getting Started

You may experience some delay duing the moments where the module is validating the username and password with the server. It is reccommended to test in virtual machine prior to usage in a personal computer.

Prerequisites

Python 3

pam_python

pam-python is a PAM module that runs the python interpreter thus allowing PAM Modules to be written in python.

python-pip

pypi is a tool for install Python packages.

pyocclient

pyocclient a python client library for owncloud/nextcloud.

Installation

Clone the repository.

git clone https://github.com/nexhero/pam_nextcloud.git
cd pam_nextcloud/

As root execute the next commands.

mkdir /lib/security
cp pam_nextcloud.py /lib/security/
cp nextcloud-login /etc/pam.d/

Configuration

Create the conf file that holds the url server

echo "https://url" > /etc/sync_os.conf

We’ll need to modify some PAM files as root. Don’t worry I’ve got your back!. Open with any text editor the file /etc/pam.d/common-auth Add this line.

@include nextcloud-login

In the next line

auth [success=1 default=ignore]	pam_unix.so nullok_secure

Change to.

auth	[success=1 default=ignore]	pam_unix.so nullok_secure try_first_pass

Authors

David Pereira <[email protected]>

License

GNU General Public License v3.0 - LICENSE

About

Pam module to authenticate to nextcloud/owncloud server

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages