Date: Thu, 13 May 2004 14:35:00 -0400 (EDT) From: Jerry McAllister <jerrymc@clunix.cl.msu.edu> To: stein.175@osu.edu (OLAF STEIN) Cc: freebsd-questions@freebsd.org Subject: Re: remove users from system Message-ID: <200405131835.i4DIZ0t27249@clunix.cl.msu.edu> In-Reply-To: <4d01124d0e90.4d0e904d0112@osu.edu> from "OLAF STEIN" at May 13, 2004 02:14:51 PM
next in thread | previous in thread | raw e-mail | index | archive | help
> > 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 >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200405131835.i4DIZ0t27249>