LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   linking /etc/passwd , group, shadow to SAN storage (https://www.linuxquestions.org/questions/linux-server-73/linking-etc-passwd-group-shadow-to-san-storage-714858/)

jamied66 03-27-2009 09:15 AM

linking /etc/passwd , group, shadow to SAN storage
 
Is there a way to link the above files to a file on a shared storage device?

I have 2 servers running RHEL 5.2 (2.6.18-128.1.1.el5), and they're set up in a simple cluster to allowed for gfs volumes on a SAN.

I'd like to be able to update usernames/passwords on one and they apply to the other system as well.

I tried creating the files on the SAN and creating a symlink in /etc, and that didn't work:

Code:

[root@mgieeprodweb1 etc]# adduser foo
adduser: unable to open password file

I also tried creating a hard link, but got an error:
Code:

[root@mgieeprodweb1 etc]# ln /var/config_store/sys/passwd passwd
ln: creating hard link `passwd' to `/var/config_store/sys/passwd': Invalid cross-device link

Is there a way to do this, or will I have to go to some sort of LDAP authentication to accomplish this?

Thanks for any ideas.

acid_kewpie 03-27-2009 09:26 AM

that's a pretty horrible architecture you're trying to create. I totally understand your motivation, but go with LDAP or similar. do things properly. If you really had to hack something simple in, you could use a cron job to periodically pull the latest files off a san and overwrite, but you really want a local file there.

jamied66 03-27-2009 09:28 AM

Fair enough. Don't have an LDAP server on this side of the firewall, so I was trying to find a quick & easy fix for a system 4 people will ever log into.

But if you're gonna' do it...

Thanks.

asimba 03-27-2009 12:45 PM

Cronjob is a good idea.

Moreover as I know you cannot have hard links across file systems ?

I dont know it GFS has something different to offer

acid_kewpie 03-27-2009 01:42 PM

If i recall right, I'm sure there is a way to specify additional passwd files, which would allow one to have a local passwd and a shared passwd file, but i'm buggered if I can find where to set this, nothing good coming up googling for pam based queries.

anomie 03-27-2009 04:01 PM

Quote:

Originally Posted by asimba
Moreover as I know you cannot have hard links across file systems ?

Correct.


All times are GMT -5. The time now is 09:35 PM.