kde KUser - expires accounts
Rick Flosi
rflosi at shrike.depaul.edu
Tue Jul 1 09:50:47 PDT 2003
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.
More information about the freebsd-stable
mailing list