remove users from system
Jerry McAllister
jerrymc at clunix.cl.msu.edu
Thu May 13 11:35:03 PDT 2004
>
> hi everybody,
>
> i recently switched from linux to freebsd, so this question might sound
> a little stupid
>
> the problem
> i removed 2 users from my system by deleting their entries in /etc/passwd
> and /etc/group (they had their own group and where in no other groups)
>
> the users are still able to login after i deleted them
> the rmuser command now does not remove them anymore because it cannot find
> their entries in /etc/passwd, cause as mentioned i deleted them from their
>
> the handbook lists all actions that are taken, when the rmuser command is
> executed and i did all actions manually except the deletion of the home
> directories of those users, because i want to keep them
>
> how can i remove those users completely?
> and is there something like a /etc/shadow file?
You said you did what rmuser does "manually". I presume that
means that you did not use rmuser directly. So, what did you
use to delete the entry from the /etc/passwd file? As you have
guessed, there is a 'shadow' file (which is called master.passwd).
There is also a password database (pwd.db).
If you edit /etc/passwd directly, then neither master.passwd nor pwd.db
will be correctly updated. So, you need to use a utility called 'vipw'.
It is just like using vi. type vipw, do your editing - remove the
line from the file - and write/quit to get out. When you leave vipw
with a write, it will automatically update master.passwd and pwd.db
for you.
////jerry
>
> please cc me on the answer as i am not in the list
Oh, you should be. You would learn so much.
/jrm
>
> thanks in advance
> olaf
>
More information about the freebsd-questions
mailing list