I would not recommend using vipw or sed to change your users' shells.

I'd just create a file of users:

cat /etc/passwd | cut -f1 -d":" > userlist

(Edit out any users you don't want to include):

then a scipt using pw to change their shells

#!/bin/sh

user=`awk '{print $1}' ./userlist`
for user in $user
  do
    pw usermod $user -s /sbin/nologin
  done

James Smallacombe                     PlantageNet, Inc. CEO and Janitor
[EMAIL PROTECTED]                                                           
http://3.am
=========================================================================


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

Reply via email to