FreeBSD - Adding users to NIS

sda100 used Ask the Experts™
I thought I might have asked this question before, but nothing in the archives...

The FreeBSD Handbook says to do this to create a new user in NIS.

      # pw useradd jsmith
      # cd /var/yp
      # make test-domain

Using pw didn't work, until I used 'pw -V /var/yp'.  Is this a fault with my setup or an omission in the handbook?

The handbook then says, "You could also run adduser jsmith instead of pw useradd jsmith."  This doesn't work either.  Like 'pw' it just creates a user in the local passwd file.

So, what is the recommended method to create a new user in NIS, bearing in mind I'd want to create homedirs etc?

Many thanks,
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
pw-V /var/yp/src/nisdomain useradd -n username -u 15001,20000 -i 15001,20000 -w no -c "Real Name" -d /home/username -m -s /bin/sh

you have to run this command under a user with sufficent permissions to do the required actions by other means.


Thank you very much - Steve :)

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial