LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   I need Help on NIS and NFS (https://www.linuxquestions.org/questions/linux-hardware-18/i-need-help-on-nis-and-nfs-378514/)

srikanthrao_d 10-30-2005 11:50 PM

I need Help on NIS and NFS
 
Hi All,

I have 20 systems which installed Linux Fedora Core 3 OS on my office. Now I want implement NIS on my office as users should have roaming profile. The problem here is already all the users they have their own user accounts on their systems. I need to those users should be NIS users and their accounts be roam through the network. If I can move those users to NIS server I can mount the home directory in all the clients with NFS. So the users can login anywhere in the network. How to move local users to NFS server, and their home directories also?

Thanks,
Srikanth

d3funct 11-01-2005 02:59 PM

Well, there are a couple of things you could try. Create the users on the NFS server with the same UID/GID and copy their entries from /etc/passwd and /etc/shadow. Then migrate their home directories by tarring them to tape/cd/dvd (whichever). Or you might look into an LDAP solution also, LDAP is more secure from what I hear than NIS.

Walman 11-01-2005 03:03 PM

I had the same task but with RH9

What I did was I made a NIS server with and created the users account again with all the same parameters they have in the other pc's . Then I removed /etc/passwd , /etc/group /etc/shadow and /etc/gshadow and related files ( in fact I only renamed them just in case , I could come back to the old configuration ) .

I configured the client NIS files on each of the other nodes , for example /etc/yp.conf ,
/etc/nsswitch.conf ,addes the NIS line on the /etc/sysconfig/network and started the ypbind services .

I restarted the pc's and when it came to loggin , no problem , everything was really good .

srikanthrao_d 11-02-2005 11:22 PM

Thanks
 
hi,

Thanks for your reply,
is there any procedure can we copy /etc/passwd and /etc/shadow to make as nis users in the nis server.

thanks,
srikanth

d3funct 11-03-2005 10:08 AM

Well, there is no written down procedure. What I would do is verify that your users UIDs are the same on each box (in other words jdoe is UID 500 on all the servers/workstations), also make sure all of the GID's on all of your servers are the same ( DBA = GID 20 on all servers/workstations). Once you are sure that is true, go to the box that will be the NIS server and rename /etc/passwd, /etc/group, /etc/shadow and /etc/gshadow to {filename}.orig, then copy those four files from one of the other servers/workstations which you know all of your users have been verified. Then, create the home directories whereever on the NIS server, just create /export/home/{username} and chown {UID}:{GID} /export/home/{username}, chmod 750 /export/home/{username}. From here setup your NIS server and Clients and verify it's all working, and get NFS running (make sure you export /export/home/). Then login as a user and mount the /export/home/{username}. From here you should be able to turn it over to the users, with an explanation of what to do if they log into a box that complains about them not having a home directory. And tell them to copy anything they need from their old /home/{username} directory to the new /export/home/{username} directory. That way you can reclaim the disk space on the local partitions. Anyway, that's about how I'd do it. If you need clarification on something just e-mail me.

srikanthrao_d 11-04-2005 03:16 AM

Hi,

Thanks for your reply. At last I got, I have tested with one user. It is working fine. I copied all these things from the work station

/etc/passwd

/etc/shadow

/etc/gshadow


/etc/group

After all I just tar the files and put on the NIS server, and I mount it on the workstation using NFS. Here I got one doubt we are copying from workstations, if the UID,GID is same in any of the machine. What is the thing I need do?

Thanks,
Srikanth

d3funct 11-04-2005 09:58 AM

Well, what I've done in the past is to edit /etc/passwd on the NIS server and changed the UIDs for all of my NIS account users to a unique number. Decide on a UID number range like say 10000 - 10500 (for 500 users) and change the UIDs starting with 10000 for the first user and just work your way up the list of users in /etc/passwd. Do the same for the GIDs in /etc/group. If you have groups for each individual user like user john and group john then the UID and GID should be the same number. Also check /etc/shadow and /etc/gshadow to verify you have the same ID numbers for the users/groups in those files ( I can't recall off the top of my head if these files have UIDs/GIDs in them, and I don't have access to a linux box here at work.)

srikanthrao_d 11-08-2005 03:57 AM

Hi,

Can we implement quotos on NIS?

Thanks,
Srikanth

d3funct 11-15-2005 01:51 PM

Quotas are implemented on filesystems, you can implement quotas on NFS, not NIS.

linuxnorks 01-22-2006 08:04 PM

Well actually i tried running NIS on Fedora or Cent OS i able to run it in no time..

Very simple...

In NIS client you just go to the cmd line.. and type

@authconfig // press return
after that mark "uses nis" it then ask you the DOMAIN which is you NIS-DOMAIN-SERVER and server which the IP address of your NIS server

then go to the command line again
@chkconfig ypbind on
@chkconfig portmap on
@service ypbind start
@service portmap start

In fedora 3 you cant use automounting technique so what i did is to place my mount in /etc/X11/gdm/PreSession/Init/:0 files

mount 172.16.19.144:/home /home/

and thats all!!!!
but this is not easy when trying to configure in ubuntu i hope i will know too


All times are GMT -5. The time now is 07:24 AM.