lambada Apprentice
Joined: 31 Jul 2005 Posts: 157
|
Posted: Thu Jun 08, 2006 11:01 pm Post subject: NIS and PAM headaches |
|
|
Hi,
I have a nis server (Red Hat 9) on which I have separated the system and nis passwd/group files.
The system ones live in etc and the nis ones live in /etc/yp. In oreder to ease the adminstration I have made some scripts and added them to the root path for adding users, changing passwords, etc. As an example see my nisuseradd script below:
Code: |
#!/bin/bash
# nisuseradd
# save /etc stuff to a safe place
cp -f /etc/passwd /etc/passwd.local
cp -f /etc/shadow /etc/shadow.local
cp -f /etc/group /etc/group.local
# move nis stuff to /etc
cp -f /etc/yp/passwd /etc/passwd
cp -f /etc/yp/shadow /etc/shadow
cp -f /etc/yp/group /etc/group
# execute useradd
useradd "$@"
# move nis stuff back to its place
cp -f /etc/passwd /etc/yp/passwd
cp -f /etc/shadow /etc/yp/shadow
cp -f /etc/group /etc/yp/group
# move /etc stuff back to its place
cp -f /etc/passwd.local /etc/passwd
cp -f /etc/shadow.local /etc/shadow
cp -f /etc/group.local /etc/group
|
All that it does is move the /etc passwd, shadow and group to a safe place, replace them with the /etc/yp ones and execute normal useradd. Then it moves stuff back.
Ok, so far so good. Now I want to move all this to a gentoo machine. I have moved and configured everything only now, when I run my little script I get an error message saying:
Code: |
useradd: PAM authentication failed
|
Is there a way I can solve this? Can I disable PAM?
Thanks for the help,
Lambada _________________ Lambada |
|