Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Jul 2003 11:50:44 -0500 (CDT)
From:      Rick Flosi <rflosi@shrike.depaul.edu>
To:        freebsd-stable@freebsd.org
Subject:   kde KUser - expires accounts
Message-ID:  <Pine.HPX.4.44.0307011136290.15713-100000@students.depaul.edu>

next in thread | raw e-mail | index | archive | help

I used KUser to add a user to my system and after saving the changes I
made KUser expired all user accounts except the newly created one.

This meant I could only login as that new user and I could get root
access.

To fix this I rebooted the computer.
When it gives you 10 seconds [or hit enter] I pressed any key but enter to
get a prompt like this:
  ok
Then at the prompt I booted into single user mode like this:
  ok boot -s
Then it boots up and asks which shell to use and I just used the default
of /bin/sh. Now I have a prompt like this:
  #
Now you can mount your filesystem and fix the expired accounts. Mount the
files with:
  # mount -t ufs -a
Then edit the /etc/master.passwd file. It is a good idea to make a backup
of the file before editing. I used the vi editor, but use what you like.
  # vi /etc/master.passwd
You will notice that each line has a part with a '-1' in it (without
quotes). Change the '-1' to a '0' (zero) for each record that should not
be expired. In my case this was I had to do this for everyline except the
new user because that account was not expired. Save the file and exit your
editor.
Now I had to run /usr/sbin/pwd_mkdb /etc/master.passwd like this:
  # /usr/sbin/pwd_mkdb /etc/master.passwd

That should restore your expired accounts.

Does anyone know if there is a patch for KUser to fix this problem. I
found some discussion about this but it was from Feb. 2003 and I was
unable to find a patch.

Hope this helps anyone that made the same mistake I did.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.HPX.4.44.0307011136290.15713-100000>