Author Topic: change zentyal user name and password  (Read 16865 times)

daniellench

  • Zen Monk
  • **
  • Posts: 82
  • Karma: +3/-1
  • sudo /etc/init.d/coffee brew
    • View Profile
    • daniellench.com
change zentyal user name and password
« on: April 10, 2012, 08:34:10 pm »
what is the correct method to change the username and or password of the original user entered during setup after the system is up and running.

best,
dan

Marcus

  • Forum Moderator
  • Zen Samurai
  • *****
  • Posts: 395
  • Karma: +12/-0
    • View Profile
    • Professional IT Service
Re: change zentyal user name and password
« Reply #1 on: April 11, 2012, 02:05:01 pm »
Hello daniellench,

You can't change a username.  You may only delete it.

With that said;
To create a new user:
1) open a terminal
2) log to your Zentyal server using SSH
3) create the user using this command:
Code: [Select]
sudo useradd <username> admine.g.
Code: [Select]
sudo useradd daniellench admin
ref:
https://help.ubuntu.com/community/AddUsersHowto

In order to change a password (from the shell)
1) log to your Zentyal server using SSH
2) change the password of a user
Code: [Select]
sudo passwd <username>e.g.
Code: [Select]
sudo passwd daniellench
In order to delete a user (from the shell)
1) log to your Zentyal server using SSH
2) delete a user by typing
Code: [Select]
sudo deluser <username>e.g.
Code: [Select]
sudo deluser daniellench
Nota Bene
1 You may change your own password by simply typing "passwd" (no need to sudo or append the username)
2 You may create unlimited admin this way BUT consider the fact that only 1 admin at a time can access the admin panel.
3 I do prefer using the CLI since it is faster.  Still, you may change the password of your admin user through the Zentyal interface.

Best,

Marcus

daniellench

  • Zen Monk
  • **
  • Posts: 82
  • Karma: +3/-1
  • sudo /etc/init.d/coffee brew
    • View Profile
    • daniellench.com
Re: change zentyal user name and password
« Reply #2 on: April 13, 2012, 05:11:52 pm »
Thanks Marcus,
I have done that and get "authentication token manipulation error" "password unchanged"
solutions found in google so far have not helped. and i dont want to break things.

On another note, can a user that was added in the zentyal users become an admin for the system?

best,
dan

scottgutman

  • Zen Apprentice
  • *
  • Posts: 30
  • Karma: +0/-0
    • View Profile
Re: change zentyal user name and password
« Reply #3 on: August 20, 2012, 09:22:28 pm »
I am having the same issue as @daniellench so apologies if this counts as hijacking.

I found out that the passwd program does not work when the following item is checked: Users and Groups->LDAP Settings->PAM Settings->Enable PAM []

I got that from this post: http://contrib.linalis.com/content/zentyal-problems-changing-root-password

After unchecking Enable PAM, I was able to use passwd to change passwords from the command line for linux users.

The only problem now is that I still can't login with the PPA username.  Get the error Incorrect password when trying to login to the Zentyal GUI.

I can login to the server via SSH with the PPA username.  I was able to login to the Zentyal GUI by adding a user created by the GUI to the system admin group from an ssh login, with adduser <username> admin

How do I get the PPA username to work as a GUI login?
« Last Edit: August 22, 2012, 09:37:49 pm by scottgutman »

scottgutman

  • Zen Apprentice
  • *
  • Posts: 30
  • Karma: +0/-0
    • View Profile
Re: change zentyal user name and password
« Reply #4 on: August 22, 2012, 09:32:09 pm »
Here is just an update to what I have done.  I hope I did not make things worse.  Please tell me if I did.

  • Changed to the root user with sudo su -  (I do this regularly, is that wrong?)
  • Added a Zentyal created user to /etc/sudoers, this is the same username added to group admin previously.
  • Deleted the username administrator created from PPA with userdel -r administrator
  • Using the Zentyal GUI, I added a user with username administrator.
  • Added username administrator to group admin with usermod -G admin administrator
Now that I had done that I went back to the GUI to logout, and tried to login with administrator.  When I clicked logout, I received errors.  I then tried to login again with the new and old usernames and got server 500 error.


I decided to reboot (and pray) to see if that would fix any problems.  It did.  I was able to login both to the Zentyal GUI and SSH with all the usernames.

But it gets better... The Zentyal GUI HAS NEVER BEEN AS FAST AS IT IS NOW!!!!!!!!!!!  I have always been used to making changes then click and wait 1 or 2 seconds.  Now, the GUI is SUPER FAST. It is really nice to work with now. But that also scares me.  Did I break something with this procedure?  If I didn't, then I recommend everyone to do it.


Any thoughts.....