Bug 1632 - Users mapped to guest do not show up in smbstatus/utmp
Summary: Users mapped to guest do not show up in smbstatus/utmp
Status: RESOLVED WONTFIX
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: File Services (show other bugs)
Version: 3.0.6
Hardware: All All
: P3 normal
Target Milestone: none
Assignee: Samba Bugzilla Account
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-19 08:54 UTC by Marc Kaplan
Modified: 2005-07-26 06:13 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Kaplan 2004-08-19 08:54:53 UTC
If you log on as a known user, the user gets an entry as an active user via
smbstatus and via utmp, if you have it enabled. Users who are mapped to guest
via the map to guest = smb.conf parameter do not show up at all in either
smbstatus or in utmp logging if configured.

Here is what I see when a user who got mapped to guest logs on:
sh-2.04# smbstatus
creating lame upcase table
creating lame lowcase table

Samba version 3.0.5
PID     Username      Group         Machine
-------------------------------------------------------------------

Service      pid     machine       Connected at
-------------------------------------------------------
SHARE1       31054   thunderbird   Thu Aug 19 08:49:48 2004
No locked files

Notice that an entry shows up in the Service section, but not in the user
accounting section. We should be placing the guest user in the user accounting
section when a user is mapped to guest.

Now here is the normal behaivor when a known user logs on:
sh-2.04# smbstatus
creating lame upcase table
creating lame lowcase table

Samba version 3.0.5
PID     Username      Group         Machine
-------------------------------------------------------------------
31354   admin         AllLocalUsers  thunderbird  (10.33.0.215)

Service      pid     machine       Connected at
-------------------------------------------------------
SHARE1       31354   thunderbird   Thu Aug 19 08:52:06 2004
No locked files
Comment 1 Gerald (Jerry) Carter (dead mail address) 2005-02-07 09:40:47 UTC
originally against 3.0.6rc2
Comment 2 Yannick Bergeron 2005-07-23 06:40:16 UTC
still present in 3.0.11 and 3.0.20pre1...
Comment 3 Yannick Bergeron 2005-07-23 07:24:40 UTC
simple...

in sources/smbd/session.c

sesion_claim()

        /* don't register sessions for the guest user - its just too
           expensive to go through pam session code for browsing etc */
        if (vuser->guest) {
                return True;
        }

I think this should be discussed... I thought that smbstatus was a safe source 
to find information about processes, shares and locks. But if sessions are not 
register for guest... this is not a safe source of information...
Comment 4 Gerald (Jerry) Carter (dead mail address) 2005-07-26 06:13:21 UTC
current behavior is by design.  If you would like to discuss
changing it, please post to the samba-technical mailing list.