Article View: csu.unix.linux
Article #133UNIX auth via an NT domain
From: Adam Carheden
Date: Tue, 08 Feb 2000 00:00
Date: Tue, 08 Feb 2000 00:00
55 lines
2633 bytes
2633 bytes
I have a Linux box running an ftp server, and I need to give the users
of my NT domain access. The samba server does a great job of
authenticating them this way, and I've set up a script to add a record
to my unix password db if that user can be authenticated via my NT
server. This it creates an entry with ! as the password, so these users
can't login to my unix box via telnet or ftp though. I have two
solutions, neither of which seem to work:
1) Have the scrip assign them their NT password when a new user is
created. I don't think passwords can be assigned with the useradd
command, which is what the script uses though. Plus, I don't know how
to get at the password from samba to pass it to the scrip in the first
place.
2) Use a PAM module. I've have pam_smb_auth, but it simply doesn't work
(yes, I have a pam_smb.conf file). Just for kicks, I used the following
line in pam.d/ftp
auth required /lib/security/pam_smb_auth.so debug
Loggin on as an NT user failed and produced the following in
/var/log/secure
Feb 8 18:09:08 ftp in.ftpd[11797]: connect from 129.82.197.251
Feb 8 18:09:11 ftp ftpd[11797]: pam_smb: Local UNIX username/password
check inc
orrect.
Feb 8 18:09:11 ftp ftpd[11797]: pam_smb: Configuration Data, Primary
OTTER, Bac
kup , Domain CNHP.
I downloaded pam_ntdom. 0.24, the latest, doesn't compile. I get
rpc_validate.c:62: parse error before `('
every time DEBUG() is called. I've traced this to the following lines
in smb.h:
#define DEBUG_BODY( level, body ) \
( (DEBUGLEVEL >= (level)) && ((debuglog body) == 0) )
#define DEBUG_HDR(level)
#define DEBUG( level, body ) (void)(DEBUG_HDR(level) &&
DEBUG_BODY(level, body))
#define DEBUGADD( level, body ) (void)(DEBUG_BODY(level, body))
It looks okay to me. Does anyone who understands #define derectives
better see any errors?
Verison 0.23 compiles okay, but produces pam_smb_auth.so, not
pam_ntdom.so as the docs say. This fails the same way as the original
pam_smb_auth.so module (which came from who knows where), except it
denys quicker.
--
Adam
Technical Details
Message-ID:
<38A0BAED.E7EA7D82@holly.colostate.edu>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1159f7,8d11b657b955a072,start X-Google-Attributes: gid1159f7,public From: Adam Carheden <carheden@holly.colostate.edu> Subject: UNIX auth via an NT domain Date: 2000/02/08 Message-ID: <38A0BAED.E7EA7D82@holly.colostate.edu> X-Deja-AN: 583458558 Content-Transfer-Encoding: 7bit X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Trace: 8 Feb 2000 17:56:52 -0700, www.cnhp.colostate.edu MIME-Version: 1.0 Newsgroups: csu.unix.linux