Author Topic: Adding Linux user to Zentyal LDAP  (Read 5278 times)

Karl

  • Zen Apprentice
  • *
  • Posts: 36
  • Karma: +1/-0
    • View Profile
Adding Linux user to Zentyal LDAP
« on: September 22, 2012, 05:34:53 pm »
Hello, I have an unforeseen issue with a duplicate user name.  When I installed Zentyal on my home server earlier this year, I installed Ubuntu Lucid initially, and then installed Zentyal from the PPA because I didn't want the GUI.  I run some non-Zentyal software on it using my Linux user (most notably a Minecraft server).  Currently I don't have any LDAP users.

I'm looking at having some LAN parties for things like Minecraft or Artemis at my house, and I'm rolling around the idea of restructuring my home network.  Specifically I'd like to try installing RADIUS on the main network and having a second, isolated guest VLAN using WPA2 with a regular passphrase and maybe also use content filtering and captive portal.  I live in a wirelessly congested area, so this will also help to increase my network security.  I work in IT and already have the knowledge and equipment to set all this up, so nevermind that part.

----------

The problem I've run into is that I can't add my existing Linux user to Zentyal 2.2.  It says the user already exists on the system.  I think it would be a lot of trouble to change my username since I've customized and scripted a number of things in the underlying Ubuntu system.  So I was wondering:

  • If there's an easy fix for this that doesn't involve using a different username, and
  • Whether Zentyal 3.0 also has this issue, since I'm planning to upgrade as soon as the tool is released.

I did notice in my Zentyal 3 test box that LDAP users can be added to PAM, which I think would be fine, but I'm not sure how to get there from here.

Thanks

----------

UPDATE: I spun up a Zentyal 3 VM installed via PPA, and I have observed it has the same problem.  It will not let a pre-existing user be added regardless of whether "Enable PAM" is checked.

UPDATE2: So, I thought I would try this on the test machine.  I deleted my user and moved my home folder.  Then I checked "Enable PAM" in Zentyal 3 and recreated my user.  And then I fixed ownership and put my stuff back.  I'm not sure whether that's an appropriate solution or not (would really like it if someone could chime in on that), however now I am unable to log into the system at the terminal.  It just says login incorrect.  I did notice that even though I've recreated my user, I do not appear in /etc/passwd or /etc/group.  Seems it has also locked me out of the Zentyal web interface.
« Last Edit: September 22, 2012, 07:38:36 pm by Karl »

Karl

  • Zen Apprentice
  • *
  • Posts: 36
  • Karma: +1/-0
    • View Profile
Re: Adding Linux user to Zentyal LDAP
« Reply #1 on: September 22, 2012, 07:37:34 pm »
Maybe the Users & Groups module is broken.  On a fresh PPA install, I added a completely different user and enabled "Enable PAM".  Even after saving changes and rebooting the system, that user can't log in at the console or via SSH.

I gather from the documentation that the user should be able to log in.  I have to assume at this point that this is a bug and my previous solution may have been correct.

UPDATE: Apparently this works if the system was originally installed from the CD instead of the PPA.  I've submitted this as a bug.  I would still like someone to take a look at the method for merging an existing user into Zentyal for when the bug is fixed.

Thanks
« Last Edit: September 22, 2012, 08:14:51 pm by Karl »

jsalamero

  • Zentyal Staff
  • Zen Hero
  • *****
  • Posts: 1419
  • Karma: +45/-1
    • View Profile
Re: Adding Linux user to Zentyal LDAP
« Reply #2 on: September 23, 2012, 04:08:52 pm »
You cannot add a user that exists on /etc/passwd (created during installation or with adduser) to the LDAP. I suggest to create an adminstrator user on installation time, and then your user on LDAP, and enable PAM, make sure the user has a valid shell or you won't be able to login. If you still cannot login, check /var/log/auth.log.

Karl

  • Zen Apprentice
  • *
  • Posts: 36
  • Karma: +1/-0
    • View Profile
Re: Adding Linux user to Zentyal LDAP
« Reply #3 on: September 24, 2012, 03:10:04 am »
Yes, I got that part, thanks... doesn't address my current dilemma.  Just to recap, I want to:

  • Migrate one pre-existing Linux user into Zentyal's management.
  • Get this "Enable PAM" bug fixed.

jsalamero

  • Zentyal Staff
  • Zen Hero
  • *****
  • Posts: 1419
  • Karma: +45/-1
    • View Profile
Re: Adding Linux user to Zentyal LDAP
« Reply #4 on: September 30, 2012, 09:20:33 am »
deluser command, move home to something temporal, create the new user on Zentyal, replace the new empty home with the previous one and set ownership properly to the final home dir.

noomi

  • Zen Apprentice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: Adding Linux user to Zentyal LDAP
« Reply #5 on: October 01, 2012, 07:58:21 am »
You cannot add a user that exists on /etc/passwd (created during installation or with adduser) to the LDAP. I suggest to create an adminstrator user on installation time, and then your user on LDAP,
I did incredible and superb in my USMLE admission test with the help of the 642-998 for more detail Fortinet for more information wikipedia best of luck