Hi, I would like to mention the existence of an not browseable undefined sharename in samba. I tested it with samba 2.2.1a, 2.2.3a and linux, sunos, freebsd. If you run a samba server and try to connect at sharename "bin", which is not defined in the smb.conf you actually achieve it. (the user that tries to connect must be is smbpasswd) In linux after the connection you see the /bin dir and in freebsd you go to / and you can browse the whole tree. (access is not with write permissions). Is this a feature of samba, because it looks to me as a bug or something? A small proof follows, not wanted to make this mail so big. Thank you. prori@ikaros: [106] ~ > uname -r 4.5-RELEASE prori@ikaros: [103] ~ > cat /usr/local/etc/smb.conf [global] workgroup = HOME server string = Unix FreeBSD hosts allow = 192.168.0. 127. load printers = no log file = /var/log/log.%m max log size = 50 security = user encrypt passwords = yes socket options = TCP_NODELAY local master = yes dns proxy = no client code page=737 #============================ Share Definitions =============================[homes] comment = Home Directories browseable = no writeable = yes prori@ikaros: [101] ~ > id uid=1001(prori) gid=1001(prori) groups=1001(prori) prori@ikaros: [102] ~ > smbd -V Version 2.2.3a prori@ikaros: [104] ~ > smbclient //ikaros/bin added interface ip=192.168.0.202 bcast=192.168.0.255 nmask=255.255.255.0 Password:****** Domain=[HOME] OS=[Unix] Server=[Samba 2.2.3a] smb: \> smb: \> cd /root smb: \root\> smb: \root\> ls . D 0 Fri Apr 19 19:59:36 2002 .. D 0 Fri Apr 19 20:06:50 2002 .msgsrc H 2 Sun Mar 10 09:53:50 2002 .klogin H 142 Mon Jan 28 15:13:22 2002 .login H 297 Mon Jan 28 15:13:22 2002 .profile H 251 Mon Jan 28 15:13:22 2002 .history H 868 Sun Mar 3 09:02:27 2002 .xinitrc AH 15 Sun Mar 3 09:39:32 2002 .xsession AH 15 Sun Mar 3 09:39:32 2002 .ssh DH 0 Thu Apr 18 16:57:51 2002 zlib.v1.1.corrected.patch 1759 Thu Apr 18 17:32:06 2002 62760 blocks of size 32768. 40290 blocks available smb: \root\> .......
Hi Panagiotis, I just verified I see the same behavior - looking into it now... Don -----Original Message----- From: Panagiotis J. Roris [mailto:pjr-lists@mail.ntua.gr] Sent: Friday, April 26, 2002 12:25 PM To: samba@lists.samba.org Subject: [Samba] bug (?) Hi, I would like to mention the existence of an not browseable undefined sharename in samba. I tested it with samba 2.2.1a, 2.2.3a and linux, sunos, freebsd. If you run a samba server and try to connect at sharename "bin", which is not defined in the smb.conf you actually achieve it. (the user that tries to connect must be is smbpasswd) In linux after the connection you see the /bin dir and in freebsd you go to / and you can browse the whole tree. (access is not with write permissions). Is this a feature of samba, because it looks to me as a bug or something? A small proof follows, not wanted to make this mail so big. Thank you. prori@ikaros: [106] ~ > uname -r 4.5-RELEASE prori@ikaros: [103] ~ > cat /usr/local/etc/smb.conf [global] workgroup = HOME server string = Unix FreeBSD hosts allow = 192.168.0. 127. load printers = no log file = /var/log/log.%m max log size = 50 security = user encrypt passwords = yes socket options = TCP_NODELAY local master = yes dns proxy = no client code page=737 #============================ Share Definitions =============================[homes] comment = Home Directories browseable = no writeable = yes prori@ikaros: [101] ~ > id uid=1001(prori) gid=1001(prori) groups=1001(prori) prori@ikaros: [102] ~ > smbd -V Version 2.2.3a prori@ikaros: [104] ~ > smbclient //ikaros/bin added interface ip=192.168.0.202 bcast=192.168.0.255 nmask=255.255.255.0 Password:****** Domain=[HOME] OS=[Unix] Server=[Samba 2.2.3a] smb: \> smb: \> cd /root smb: \root\> smb: \root\> ls . D 0 Fri Apr 19 19:59:36 2002 .. D 0 Fri Apr 19 20:06:50 2002 .msgsrc H 2 Sun Mar 10 09:53:50 2002 .klogin H 142 Mon Jan 28 15:13:22 2002 .login H 297 Mon Jan 28 15:13:22 2002 .profile H 251 Mon Jan 28 15:13:22 2002 .history H 868 Sun Mar 3 09:02:27 2002 .xinitrc AH 15 Sun Mar 3 09:39:32 2002 .xsession AH 15 Sun Mar 3 09:39:32 2002 .ssh DH 0 Thu Apr 18 16:57:51 2002 zlib.v1.1.corrected.patch 1759 Thu Apr 18 17:32:06 2002 62760 blocks of size 32768. 40290 blocks available smb: \root\> ....... -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
Hi Everyone, The ability to access the /usr/bin subdirectory is a function of samba looking for a 'home directory' in the user store (/etc/passwd in this case). It FINDS it because the system user 'bin' is defined as: bin:*:2:2::/usr/bin:/sbin/sh You can prevent this behavior by adding the following line to your 'homes' section of the smb.conf file: valid users = %S This will ensure that the user of the home directory is in fact the appropriate unix user (for in this instance 'bin')... BTW, this is true of ANY 'home directory' listed in the /etc/passwd file... Hope this helps, Don -----Original Message----- From: Panagiotis J. Roris [mailto:pjr-lists@mail.ntua.gr] Sent: Friday, April 26, 2002 12:25 PM To: samba@lists.samba.org Subject: [Samba] bug (?) Hi, I would like to mention the existence of an not browseable undefined sharename in samba. I tested it with samba 2.2.1a, 2.2.3a and linux, sunos, freebsd. If you run a samba server and try to connect at sharename "bin", which is not defined in the smb.conf you actually achieve it. (the user that tries to connect must be is smbpasswd) In linux after the connection you see the /bin dir and in freebsd you go to / and you can browse the whole tree. (access is not with write permissions). Is this a feature of samba, because it looks to me as a bug or something? A small proof follows, not wanted to make this mail so big. Thank you. prori@ikaros: [106] ~ > uname -r 4.5-RELEASE prori@ikaros: [103] ~ > cat /usr/local/etc/smb.conf [global] workgroup = HOME server string = Unix FreeBSD hosts allow = 192.168.0. 127. load printers = no log file = /var/log/log.%m max log size = 50 security = user encrypt passwords = yes socket options = TCP_NODELAY local master = yes dns proxy = no client code page=737 #============================ Share Definitions =============================[homes] comment = Home Directories browseable = no writeable = yes prori@ikaros: [101] ~ > id uid=1001(prori) gid=1001(prori) groups=1001(prori) prori@ikaros: [102] ~ > smbd -V Version 2.2.3a prori@ikaros: [104] ~ > smbclient //ikaros/bin added interface ip=192.168.0.202 bcast=192.168.0.255 nmask=255.255.255.0 Password:****** Domain=[HOME] OS=[Unix] Server=[Samba 2.2.3a] smb: \> smb: \> cd /root smb: \root\> smb: \root\> ls . D 0 Fri Apr 19 19:59:36 2002 .. D 0 Fri Apr 19 20:06:50 2002 .msgsrc H 2 Sun Mar 10 09:53:50 2002 .klogin H 142 Mon Jan 28 15:13:22 2002 .login H 297 Mon Jan 28 15:13:22 2002 .profile H 251 Mon Jan 28 15:13:22 2002 .history H 868 Sun Mar 3 09:02:27 2002 .xinitrc AH 15 Sun Mar 3 09:39:32 2002 .xsession AH 15 Sun Mar 3 09:39:32 2002 .ssh DH 0 Thu Apr 18 16:57:51 2002 zlib.v1.1.corrected.patch 1759 Thu Apr 18 17:32:06 2002 62760 blocks of size 32768. 40290 blocks available smb: \root\> ....... -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba