You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
David Pereira 610d71dbae
Merge pull request #1 from SavSanta/patch-1
2 years ago
.gitignore Initial commit 3 years ago
LICENSE Initial commit 3 years ago
README.org capitalize 2 years ago
nextcloud-login First commit 3 years ago
pam_nextcloud.py I used to ask for the password twice 3 years ago

README.org

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 <inexhero@gmail.com>

License

GNU General Public License v3.0 - LICENSE