Hi- I'm working on a graphical interface to smbclient/smbmount/smbumount. As part of its operation, it will mount shares in directories under a user's home directory. I've run into a bit of a problem regarding the distributions of the mount utilities, specifically on Redhat 5.1/5.2. They are shipping an RPM with smbfs 2.0.1, which is known to have a security hole... so it should not be setuid root. I have found an RPM of smbfs 2.0.2, but it doesn't contain the smbumount utility- it says instead that umount works just as well. This is true, but only if you are root. Otherwise, it complains that the mount is not listed in /etc/fstab. I don't want to have my program be setuid root. It would be insecure, and shouldn't be necessary. I've also tried, with no success, to compile smbfs 2.0.2 myself (and possibly create an RPM). I get several screens of compiling errors, all of which are due to conflicting/duplicate definitions of constants and structs. Can anyone point me to either (a) a distribution of smbfs 2.0.2 that includes smbumount, or (b) suggestions why I can't compile it myself. I'm running RH5.1, 2.0.35 kernel, glibc 2.0.7-29 rpm. Thanks in advance. -- -Brian Ryner bryner@uiuc.edu
> Hi- > > I'm working on a graphical interface to smbclient/smbmount/smbumount. > As part of its operation, it will mount shares in directories under a > user's home directory. > > I've run into a bit of a problem regarding the distributions of the > mount utilities, specifically on Redhat 5.1/5.2. They are shipping an > RPM with smbfs 2.0.1, which is known to have a security hole... so it > should not be setuid root. I have found an RPM of smbfs 2.0.2, but it > doesn't contain the smbumount utility- it says instead that umount works > just as well. This is true, but only if you are root. Otherwise, it > complains that the mount is not listed in /etc/fstab. I don't want to > have my program be setuid root. It would be insecure, and shouldn't be > necessary. > > I've also tried, with no success, to compile smbfs 2.0.2 myself (and > possibly create an RPM). I get several screens of compiling errors, all > of which are due to conflicting/duplicate definitions of constants and > structs. > > Can anyone point me to either (a) a distribution of smbfs 2.0.2 that > includes smbumount, or (b) suggestions why I can't compile it myself. > I'm running RH5.1, 2.0.35 kernel, glibc 2.0.7-29 rpm. > > Thanks in advance.Hi The problem could be that you are using glibc - the structure of the include files seem to have changed with libc6/glibc2. Scan the sources, and look for includes from linux/<some file> sys/<some file> and play around - I got some programms to compile with libc6 this way... Greetings, Florian
I did try playing around with this some. I got smbumout to compile this way, unfortunately I think I must have chosen the wrong header files to comment out, because I tried to unmount and it told me it was "probably a non-SMB filesystem" when in fact it was. "Florian G. Pflug" wrote:> > Hi > > The problem could be that you are using glibc - the structure of the include > files seem to have changed with libc6/glibc2. Scan the sources, and look for > includes from linux/<some file> sys/<some file> and play around - I got some > programms to compile with libc6 this way... > > Greetings, Florian-- -Brian Ryner bryner@uiuc.edu
>I attached my diff file to compile Samba under Linux kernel 2.1.126 with >glibc-2.0.7-980507 (shipped w/RedHat 5.1 as RPM glibc-2.0.7-7) installed. >There was a huge amount of errors and just these simple include fixes madeit >go well.Unfortunately, the smbmount utilities included WITH samba are for kernel 2.1.70 and higher. For 2.0 kernels, you have to use the separately distributed smbfs package. I might try merging your include patches though, and see what happens. I'll be glad when kernel 2.2 is out and there won't be this distinction. -- -Brian Ryner bryner@uiuc.edu
I am seeing a very strange and very inconsistent problem in smbfs. It happens while I am using smbmount, then afio, to back up some Win95 shares. What I am seeing is errors like this in my logs: Jan 25 02:54:07 myserver kernel: smb_receive: rcls=2, err=1 Jan 25 02:54:07 myserver kernel: smb_proc_readdir_long: name=\dir1\subdir2\ subdir3\*, entries=0, rcls=2, err=1 Jan 25 02:54:07 myserver kernel: smb_refill_dircache: readdir failed, result=-2 3 This is always the typical sequence. What I find upon examining my backup archive is that the directory involved will not have any files backed up from it; i.e., it missed everything in subdir3. The problem is sporadic and generally involves different machines and directories; it's not readily reproducible. It's pretty bad when the directory involved is 'C:\WINDOWS'. =:-0 Though it does save tape. :-b I am running Debian Linux with kernel version 2.2.10, smbmount 2.0.6 (I'm using mount -t smbfs to mount the Win95 shares). (I am right in thinking that the old Win95 bug fix option for the kernel has gone away, right? Don't see it in 'make menuconfig'). Any ideas about what the problem is, how to solve it, or diagnose it? -- Microsoft forced OEMs to ignore consumer demand for a browserless version of Windows. -- Judge Thomas Penfield Jackson Your most unhappy customers are your greatest source of learning. -- Bill Gates
Here is my scenario, I'm trying to mess with pam_smb and smbfs to connect to a windows nt server and mount shares off of it, is it possible to have smbfs use the currently logged in username and password to mount the shares?
Hi I have mounted W2K share to the Linux box (RH 7.0 kernel 2.2.19-7.0.16, samba-2.2.5-1). Here is part of /etc/fstab: //machine/share /u/smb/machine smbfs username=smbusername,workgroup=smbworkgroup,uid=675,fmask=440 0 0 If I do "ls |wc" in that mounted directory, then I get different results every time I try to count files. [root@cipsftp Persons]# ls |wc 26926 26926 340100 [root@cipsftp Persons]# ls |wc 26933 26933 340191 [root@cipsftp Persons]# ls |wc 26936 26936 340230 [root@cipsftp Persons]# ls |wc 26923 26923 340061 Please help!!! Thanks, Stas