LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   NIS (https://www.linuxquestions.org/questions/linux-newbie-8/nis-4175444793/)

rajesh_22ap 01-09-2013 06:05 AM

NIS
 
I have situation where i have NIS server with five user but i want one of the user will not login in domain please provide a solution.......

TB0ne 01-09-2013 08:42 AM

Quote:

Originally Posted by rajesh_22ap (Post 4866017)
I have situation where i have NIS server with five user but i want one of the user will not login in domain please provide a solution.......

Solution to WHAT? You give us no details about your situation, so there's little we can help with. Things like what version/distro of Linux you're using? What OS (including version/distro), the five clients are running on their workstations? What you've done/tried so far?? ANTYHING???

The /etc/nsswitch.conf file should have entries like:
Code:

passwd: files nis
shadow: files nis
group:  files nis

...which means it checks the LOCAL file first, before going to NIS. Instead of using yppasswd, use the regular passwd command, which should update the local shadow file, without changing the NIS information. Try that.

shivaa 01-09-2013 12:24 PM

Please explain your question little more.

Do you want to restrict that user to use ssh or telnet type of login process? Or do you simply want to make that user inactive in your NIS system?

To inactive that user, you can do:-
Code:

cp /etc/passwd /etc/passwd.$(date +%Y%m%d)      # First take backup of /etc/passwd file
And either comment out that user's passwd file entry, as:-
#username:xyz:123:123:sample-entry:....
Or make following changes in user's shell and home directory:-
username:xyz:123:123:sample-entry:/dev/null:/bin/false



All times are GMT -5. The time now is 04:21 PM.