Author Topic: can't reset admin username / password  (Read 5575 times)

kevinmccarthy

  • Zen Apprentice
  • *
  • Posts: 24
  • Karma: +0/-0
    • View Profile
Re: can't reset admin username / password
« Reply #30 on: September 10, 2011, 01:07:35 am »
And that is a special friend discount. :)

kevinmccarthy

  • Zen Apprentice
  • *
  • Posts: 24
  • Karma: +0/-0
    • View Profile
Re: can't reset admin username / password
« Reply #31 on: September 10, 2011, 01:31:22 am »
Oh, when I use this command, Chad shows in the passwd file. That command for the shadow file says permission denied.

grep chad /etc/passwd

(Results:)
chad:x:1000:1000:chad,,,:/home/chad:/bin/bash

When I first log in to vsphere and select the Zentyal VM, I select the console tab. It brings up a Zentyal logo and username box. I enter the only one that works there: chad & password. It still works here. But, I cannot access the Administrator Console. Double clicking on that brings up a password box. The old admin password (chad's) doesn't work. The dialogue just goes away - not even an invalid pw error.

The User Console works, but does not appear to have enough permissions to change the password.

However, in the User Console, I used this line and had better success:

sudo grep chad /etc/shadow

Result:
[sudo] password for chad: (i entered it)
sudo: account or password is expired, reset your password and try again
changing password for chad.
(current) UNIX password: (I entered a new pw)
sudo: pam_chauthtok: Authentication token manipulation error
Sorry, try again.
[sudo].... I tried this a few times then got this error...

3 incorrect password attempts

It brought me back to a command line.

Does that provide any further info that is helpful?

christian

  • Guest
Re: can't reset admin username / password
« Reply #32 on: September 10, 2011, 09:23:21 am »
I was thinking about this:
sudo chage -E -1 chad
which should reactivate account...

but you can't "sudo" isn't it?
any other account with sudo privileges?
« Last Edit: September 10, 2011, 11:13:36 am by christian »

kevinmccarthy

  • Zen Apprentice
  • *
  • Posts: 24
  • Karma: +0/-0
    • View Profile
Re: can't reset admin username / password
« Reply #33 on: September 10, 2011, 06:56:48 pm »
The same errors occur.

I typed as you stated:
sudo chage -E -1 chad

Results:
[sudo] password for chad: (I typed the original pw)
sudo: Account or password is expired, reset your password and try again
Changing password for chad.
(current) UNIX password: (I typed the original pw)
sudo: pam_chauthtok: Authentication token manipulation error
Sorry, try again.
[sudo] password for chad: (I typed the original pw)
sudo: Account or password is expired, reset your password and try again
Changing password for chad.
(current) UNIX password: (I typed a "new" pw just in case that is what it was wanting)
sudo: pam_chauthtok: Authentication token manipulation error
Sorry, try again.
[sudo] password for chad: (I typed the original pw)
Sorry, try again.
sudo: 3 incorrect password attempts

It seems that sudo is working. But, the commands are not. I am beginning to think maybe his pw is not in the shadow file (like I know what I'm talking about, haha). But, I could not check it as stated above.

christian

  • Guest
Re: can't reset admin username / password
« Reply #34 on: September 10, 2011, 07:19:22 pm »
I don't think sudo "works".

To summarize: the only local account you can use to open session (terminal) is "chad" but you can't use it with sudo privileges because account expired (due to the chage command you type some days ago).
If you don't have any other account at system level (btw I don't understand how you can authenticate if chad account expired), the only way it to reset root password and change chad's password as root.

You can do it restarting your system in single user mode (e.g. look at this http://www.debuntu.org/recover-root-password-single-user-mode-and-grub)

BTW what's the result of ldapsearch command?

kevinmccarthy

  • Zen Apprentice
  • *
  • Posts: 24
  • Karma: +0/-0
    • View Profile
Re: can't reset admin username / password
« Reply #35 on: September 10, 2011, 08:19:14 pm »
I don't think sudo "works".

To summarize: the only local account you can use to open session (terminal) is "chad" but you can't use it with sudo privileges because account expired (due to the chage command you type some days ago).
If you don't have any other account at system level (btw I don't understand how you can authenticate if chad account expired), the only way it to reset root password and change chad's password as root.

You can do it restarting your system in single user mode (e.g. look at this http://www.debuntu.org/recover-root-password-single-user-mode-and-grub)

BTW what's the result of ldapsearch command?

I don't know the name of the ldap server, if there is one. I was left with no notes regarding this. So that command line keeps telling me it can't contact the LDAP server.

I am using VMWare's vSphere to access the virtual server. I select to reboot. But, while in the console, if I press esc, an error message shows up...

* to run ddclient as a daemon, please set run_daemon to 'true' in /etc/default/ddclient
...done

The only way to proceed is to hit escape again which continues the boot with the zentyal logo and brings me to the zentyal login screen. Ugh. Circles.


christian

  • Guest
Re: can't reset admin username / password
« Reply #36 on: September 10, 2011, 08:27:29 pm »
if you run the ldapsearch from Zentyal server, you can type here 127.0.0.1 (localhost) as ldap server is one of Zentyal components.

and I forgot about the VM  >:(

Try this http://ubuntuforums.org/showthread.php?t=1655265
« Last Edit: September 10, 2011, 08:31:04 pm by christian »

kevinmccarthy

  • Zen Apprentice
  • *
  • Posts: 24
  • Karma: +0/-0
    • View Profile
Re: can't reset admin username / password
« Reply #37 on: September 10, 2011, 08:37:28 pm »
if you run the ldapsearch from Zentyal server, you can type here 127.0.0.1 (localhost) as ldap server is one of Zentyal components.

and I forgot about the VM  >:(

Try this http://ubuntuforums.org/showthread.php?t=1655265

Okay, that worked better. Here are the results:

# extended LDIF
#
# LDAPv3
# base <dc=host,dc=domain,dc=com> with scope subtree
# filter: uid=chad
# requesting: ALL
#

# search result
search: 2
result: 32 no such object

# numResponses: 1


christian

  • Guest
Re: can't reset admin username / password
« Reply #38 on: September 10, 2011, 08:42:13 pm »
kind off... no such object because you have to replace "host" with Zentyal host name. Well, this is in fact a short -cut that might be wrong, depending on how Zentyal has been configured.
to find the right baseDN, you should look at Zentyal "users & groups" -> LDAP settings
If you can't access it, then root baseDN can be discovered searching for RootDSE but let's focus on resetting root password first  ;)

christian

  • Guest
Re: can't reset admin username / password
« Reply #39 on: September 13, 2011, 10:10:29 pm »
Just curious: where do you stand with this? Did you reset root password mounting disk as described in link I provided?

kevinmccarthy

  • Zen Apprentice
  • *
  • Posts: 24
  • Karma: +0/-0
    • View Profile
Re: can't reset admin username / password
« Reply #40 on: September 13, 2011, 11:38:43 pm »
Thanks for all the help. After pulling out the rest of my hair, I just blew away the VM and started over. Seems to be working now just fine - other than a slow learning curve. :)