remove users from system

2004-05-13 Thread OLAF STEIN
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?

please cc me on the answer as i am not in the list

thanks in advance
olaf

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: remove users from system

2004-05-13 Thread Chuck Swiger
OLAF STEIN wrote:
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
Run pwd_mkdb.  It would be a good idea to use vipw when editting password 
files directly, BTW

--
-Chuck
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: remove users from system

2004-05-13 Thread Kent Stewart
On Thursday 13 May 2004 11:14 am, OLAF STEIN wrote:
 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?


Use vipw to do the delete. You deleted the text in the shadow text file 
and left /etc/master.passwd with the previous working version. You can 
force the update of master.passwd but I think you should get used to 
using vipw.

Kent

-- 
Kent Stewart
Richland, WA

http://users.owt.com/kstewart/index.html
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: remove users from system

2004-05-13 Thread Jerry McAllister
 
 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
 
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: remove users from system

2004-05-13 Thread Simon Barner
OLAF STEIN wrote:

[ pls wrap your lines at column 72-76 (for those reading mail in a
  text console - thanks ]
  
 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

You can also safely use rmuser, since it will prompt whether the home
directory is to be removed or not.

Simon


signature.asc
Description: Digital signature


Re: remove users from system

2004-05-13 Thread John Oxley
On Thu 2004-05-13 (11:31), Kent Stewart wrote:
 On Thursday 13 May 2004 11:14 am, OLAF STEIN wrote:
  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?
 
 
 Use vipw to do the delete. You deleted the text in the shadow text file 
 and left /etc/master.passwd with the previous working version. You can 
 force the update of master.passwd but I think you should get used to 
 using vipw.

/etc/passwd is a world readable version on /etc/master.passwd so that no one
can see your password hash.  editing /etc/passwd is pointless, and editing
/etc/master.passwd to delete a user is like using a cannon to kill a mosquito.
Use pw userdel -rn username to delete the user from /etc/master.passwd, rebuild
the pwd.db, remove him/her from all the groups and kill their homedir.

Editing master.passwd is a *VERY* bad idea unless you use vipw, which rebuilds
pwd.db so in short, DON'T.  Read the man pages for pw, as it is very useful for
manipulating users and groups.

Hope this helps.

-Ox

-- 
/~\ The ASCII   ASCII stupid question, get a EBCDIC ANSI.
\ / Ribbon Campaign John Oxley
 X  Against HTMLhttp://oxo.rucus.net/
/ \ Email!  oxo at rucus.ru.ac.za
Personally, I'd rather pay for my freedom than live in a bitmapped, pop-up-happy 
dungeon like NT.
-- Thomas Scoville
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]