1.9.18p1 user validation failure
Niels Baggesen
Niels.Baggesen at uni-c.dk
Tue Jan 13 12:23:21 GMT 1998
I have just upgraded from 1.9.17p4 to 1.9.18p1. This problem does not exist
with 1.9.17 (or earlier, we have been using sambe for several years).
Samba is running on a Sparc20, Solaris 2.5, gcc 2.7.2.1
When I log in to WfWG 3.11 with userid recnba, and then access a share
\\host\acts96%nba (where nba is my Unix login), I am denied access.
The share is defined with
[general]
guest account = nobody
[acts96]
path = /acts96
writable = true
create mode = 755
group = acts
valid users = @acts
which may and may not influence this. nba is a member of acts, nobody is not.
The (I think) relevant part of the log (level 5) is as follows:
Selected protocol DOS LM1.2X002
01/13/1998 10:51:50 Transaction 2 of length 101
switch message SMBsesssetupX (pid 21600)
sesssetupX:name=[RECNBA]
Trying username recnbA
Trying username recnbA
Trying username recnbA
Registered username nobody for guest access
nobody is in 5 groups
60001 101 106 108 112
uid 60001 registered to name nobody
Clearing default real name
Chained message
switch message SMBtconX (pid 21600)
01/13/1998 10:51:51 invalid username/password for acts96
01/13/1998 10:51:51 error packet at line 171 cmd=117 (SMBtconX) eclass=2 ecode=2
01/13/1998 10:51:54 Transaction 3 of length 77
switch message SMBtconX (pid 21600)
01/13/1998 10:51:55 invalid username/password for acts96
01/13/1998 10:51:55 error packet at line 171 cmd=117 (SMBtconX) eclass=2 ecode=2
01/13/1998 10:52:04 Transaction 4 of length 77
switch message SMBtconX (pid 21600)
01/13/1998 10:52:05 invalid username/password for acts96
01/13/1998 10:52:05 error packet at line 171 cmd=117 (SMBtconX) eclass=2 ecode=2
01/13/1998 10:52:22 Transaction 5 of length 74
switch message SMBtconX (pid 21600)
01/13/1998 10:52:22 invalid username/password for acts96
01/13/1998 10:52:22 error packet at line 171 cmd=117 (SMBtconX) eclass=2 ecode=2
01/13/1998 10:52:26 Transaction 6 of length 81
switch message SMBtconX (pid 21600)
ACCEPTED: given username password ok
found free connection number 37
Forced group acts
Connect path is /home/acts96
nba is in 8 groups
57 10 101 14 106 108 112 116
Can't become connected user!
Yielding connection to 37 acts96
Yielding connection to 37 STATUS.
Yield successful
01/13/1998 10:52:26 error packet at line 171 cmd=117 (SMBtconX) eclass=2 ecode=2
01/13/1998 10:53:26 Closing idle connection
I have tried to fix the problem with the following patch, but I am not sure
this is the right solution.
diff -ru samba-1.9.18p1/source/password.c samba-1.9.18p1l/source/password.c
--- samba-1.9.18p1/source/password.c Mon Jan 12 01:33:21 1998
+++ samba-1.9.18p1l/source/password.c Tue Jan 13 11:30:13 1998
@@ -1118,6 +1118,7 @@
ret = user_in_list(user,user_list);
}
+ DEBUG(4,("user_ok %s = %d\n",user,ret));
return(ret);
}
@@ -1225,7 +1226,14 @@
/* check the given username and password */
if (!ok && (*user) && user_ok(user,snum)) {
ok = password_ok(user,password, pwlen, NULL);
- if (ok) DEBUG(3,("ACCEPTED: given username password ok\n"));
+ if (ok) {
+ DEBUG(3,("ACCEPTED: given username password ok\n"));
+ if (vuser != 0 && vuser->guest) {
+ DEBUG(3,("upgrading from guest to 'real' user\n"));
+ strcpy(vuser->name, user);
+ vuser->guest = False;
+ }
+ }
}
/* check for a previously registered guest username */
/Niels
--
Niels Baggesen, UNI-C, Olof Palmes Alle 38, DK-8200 Aarhus N, Denmark
Email: Niels.Baggesen at uni-c.dk Tel: +45 89 37 66 69 Fax: +45 89 37 66 77
More information about the samba
mailing list