Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
NIS and PAM headaches
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
lambada
Apprentice
Apprentice


Joined: 31 Jul 2005
Posts: 157

PostPosted: Thu Jun 08, 2006 11:01 pm    Post subject: NIS and PAM headaches Reply with quote

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
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum