Possible to deny all NIS users from login?

Hello all :)

In the handbook it is explained how to prevent specific NIS users from logging in. Is it possible to deny all NIS users from logging in?

This is what I have done:
Code:
echo 'nisdomainname="example"' >> /etc/rc.conf
echo 'nis_client_enable="YES"' >> /etc/rc.conf

echo "+:::::::::" >> /etc/master.passwd
echo "+:*::" >> /etc/group
pwd_mkdb -p /etc/master.passwd

/etc/netstart
/etc/rc.d/ypbind start

Hugs,
Sandra
 
Very nice =) Thanks =)

I had to do both

Code:
echo "+:::::::::/usr/sbin/nologin" >> /etc/master.passwd
echo "AllowUsers root sandra" >> /etc/ssh/sshd_config

before sshd would deny login. With just the nologin it would login and then logout right away.
 
Back
Top