Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Apr 2007 11:15:58 -0400
From:      Bill Moran <wmoran@potentialtech.com>
To:        Laszlo Nagy <gandalf@designaproduct.biz>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Cannot delete user???
Message-ID:  <20070413111558.88692726.wmoran@potentialtech.com>
In-Reply-To: <461F99DF.7020202@designaproduct.biz>
References:  <461F99DF.7020202@designaproduct.biz>

next in thread | previous in thread | raw e-mail | index | archive | help
In response to Laszlo Nagy <gandalf@designaproduct.biz>:
> 
>   Hi,
> 
> I cannot remove the user with 'miller'. pw says it does not exists. 
> However, rmuser says that it does exist, but it cannot delete it (I get 
> a "no such file or directory" message). I also tried to re-add this 
> user, but it also fails. (I have deleted 'miller' from /etc/passwd, but 
> it is no use...) Please see below. How can I remove this user?

Did you possibly delete it from /etc/passwd before you did everything else?

It's not safe to edit /etc/password directly.  If you issue vipw, does
the user still show up?  if so, delete him there and /etc/passwd should
be regenerated correctly.

> gandalf@something.com~#pw userdel miller
> pw: user 'miller' does not exist: No such file or directory
> gandalf@something.com~#rmuser miller
> Matching password entry:
> 
> miller:*:1038:1003::0:0:Thomas Miller:/home/miller:/bin/csh
> 
> Is this the entry you wish to remove? y
> Remove user's home directory (/home/miller)? y
> Removing user (miller): home passwdpw: user 'miller' does not exist: No 
> such file or directory
> .
> gandalf@something.com~#adduser
> Username: miller
> Full name: Thomas Miller
> Uid (Leave empty for default):
> Login group [miller]: users
> Login group is users. Invite miller into other groups? []:
> Login class [default]:
> Shell (sh csh tcsh scponly nologin) [sh]: csh
> Home directory [/home/miller]:
> Use password-based authentication? [yes]:
> Use an empty password? (yes/no) [no]:
> Use a random password? (yes/no) [no]:
> Enter password:
> Enter password again:
> Lock out the account after creation? [no]:
> Username   : miller
> Password   : *****
> Full Name  : Thomas Miller
> Uid        : 1041
> Class      :
> Groups     : users
> Home       : /home/miller
> Shell      : /bin/csh
> Locked     : no
> OK? (yes/no): yes
> pw: login name `miller' already exists
> adduser: ERROR: There was an error adding user (miller).
> Add another user? (yes/no):
> 
> 
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"


-- 
Bill Moran
http://www.potentialtech.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070413111558.88692726.wmoran>