Michael Kelly
2004-Nov-18 16:43 UTC
[Samba] Connecting Suse9.2 to Samba shares in a windows network
Hi All, Our office is running somes tests by introducing a couple of Linux workstations into the mix to see how they fair. I am however having some issues connecting these workstations to the shares offered by our Samba 3.02 server. I know that this is not really a samba issue, but I thought I might be able to get some help here to rectify my problems. I apologize if this is too far off topic for this list. Here is the setup: It is a basic workgroup network, no domain, with no PDC or anything of that sort. Authentication for the shares is done simply by having a macthing username/password on a win2000Pro workstation. The majority of shares on the server have the SUID and SGID set to a certain user for simplicity and to resolve the Microsoft Office file locking issues. However, each user's My Documents directory is a server share that is accessed automatically by way of the username used on the workstation. I have left out a few details, but they are unimportant. I do not want the users to have to mount any drives themselves on the Linux workstations so I would like them to be mounted automatically when the user logs in, not at boot time, but login time as these Linux workstations will be multiuser so will need to mount different My Documents directories. I have put the share definitions into fstab, but that will not do the My Documents correctly. I have also tried using autofs which works well for the regular shares, but again does not work for My Documents. I have found info on doing something similar with an NFS filesystem but nothing pertaining to smbfs and what I am trying to do with the My Documents share I am currently mounting them via a script that is called from .bashrc. This works, but it just does not seem very elegant and I know that it can be done better in Linux, I am just not sure how. I would like these tests to pass with flying colors to show the higher ups that Linux will work as a workstation, but having to write a custom script for each user to be able to mount the Samba shares will not help my case. As I said before, I need everything to happen at automatically as any people that will be working with these Linux workstations are not computer savy. Thanks for any ideas Michael Kelly
Michael Kelly
2004-Nov-18 17:31 UTC
[Samba] Connecting Suse9.2 to Samba shares in a windows network
Hi and thank you for your reply, I am reasonably knowledgeably about Linux. I tried using fstab as kindof a last resort, almost something you know is not going to work, but you do it anyway out of frustration. I will explain a little further. The users who will be testing the Linux Workstations also have Windows workstations, not dual boot, but a different machine. While on Windows, these users My Documents directories are stored on the file server. To the user, all data appearing to be stored in the local My Documents directory is actually on the file server. When the user logs into their Windows workstation they are connected to their My Documents directory on the Samba file server by means of their username. I do not have access to the smb.conf at this moment, but from what I remember this is the share definition to achieve to above. [mydocs] path = /mnt/file_server/mydocs/%u public = no writable = yes browseable = no What I would like to have happen is when a user moves from their Windows work station to the Linux workstation they will have access to their My Documents directory the same as they have it on their Windows workstation. I am currently not concerned about making any of the file system on the Linux workstations available to the Windows systems. We are moving away from the sharing of documents between individual workstations, it should all be done via the file server. I apologize for not being clear enough in my original post. Thanks for any further suggestions Michael Kelly>>><joec@aracnet.com> 11/18 9:01 am >>>Michael Kelly <mkelly@victoria.komex.com> wrote :>Hi All,>First and foremost, post your smb.conf file. That is the best way for us to help you.>Our office is running somes tests by introducing a couple of Linux>workstations into the mix to see how they fair. I am however havingsome>issues connecting these workstations to the shares offered by our Samba>3.02 server.>>I know that this is not really a samba issue, but I thought I might be>able to get some help here to rectify my problems. I apologize if this>is too far off topic for this list.Sorry.. but it kinda IS a samba issue. :) Trying to get two disparate (in the case of Windows, desperate?) OS'es to talk is never entirely easy.>>Here is the setup:>>It is a basic workgroup network, no domain, with no PDC or anything of>that sort. Authentication for the shares is done simply by having a>macthing username/password on a win2000Pro workstation. The majority of>shares on the server have the SUID and SGID set to a certain user for>simplicity and to resolve the Microsoft Office file locking issues.>However, each user's My Documents directory is a server share that is>accessed automatically by way of the username used on the workstation.I>have left out a few details, but they are unimportant.Documents is a good place to share data with...>>I do not want the users to have to mount any drives themselves on the>Linux workstations so I would like them to be mounted automaticallywhen>the user logs in, not at boot time, but login time as these Linux>workstations will be multiuser so will need to mount different My>Documents directories.>Tha nature of Samba and Linux is that if your samba server is running, once the user logs in, then they will have access to the samba shares listed in your smb.conf file. This is the file in which you determine what shares to make available to your Windows users.>I have put the share definitions into fstab, but that will not do theMy>Documents correctly. I have also tried using autofs which works wellfor>the regular shares, but again does not work for My Documents. I have>found info on doing something similar with an NFS filesystem butnothing>pertaining to smbfs and what I am trying to do with the My Documents>shareUmmmmm how familiar are you with linux/unix? fstab is meant for mounting files that are to be distributed among linux workstations. You can use this one of two ways: 1 - You have a large pool of file servers that you want to distribute to other linux workstations 2 - You have a collection of Windows PCs that contains specific data (i.e. documents, CAD drawings or database info) that you want to mount via smbfs (samba file share). In this case, with only two linux machines, you do not have to be concerned about mounting the windows shares to the linux machine. You do have to make entries in the smb.conf file in order to make the linux shares visible to the windows users.>>I am currently mounting them via a script that is called from .bashrc.>This works, but it just does not seem very elegant and I know that it>can be done better in Linux, I am just not sure how.>>I would like these tests to pass with flying colors to show the higher>ups that Linux will work as a workstation, but having to write a custom>script for each user to be able to mount the Samba shares will not help>my case.>You can write a generic script that can interpret who the user is and execute accordingly. Again, how much experience do you have as a linux/unix user? From your description here, I am not sure I fully understnad exactly your setup. I think I do, but it is not completely clear. Let me layout to you what I see you wanting to do: 1 - You wish to share 'My Documents' from your linux machine(s) 2 - 'My Documents' will be located on your linux machines and will be accessible by all WIndows users. Please confirm. That way, we can set about helping you better. :) Joe
Michael Kelly
2004-Nov-18 17:42 UTC
[Samba] Connecting Suse9.2 to Samba shares in a windows network
Thank you for your reply Michael, I will look further into the generalization of my current script. When I was writing it I was looking at it only for one specific user, and then once working correctly, hopefully moving it to a more general approach that used the system to determine the actual user logging in. I will also check into running it from .profile as well since the more I can automate the setup of new users the better. I am glad to see that I may have been on the right track with my script. Thanks again for the ideas Michael Kelly>>>Michael Wray <mwray@aimconnect.com> 11/18 9:10 am >>>It seems to me the only more elegant solution would be to make a a mount script that runs from .profile instead. (This way it can be copied to their home directory at user setup.) you could write a script to do the mounting that used things like the output of whoami and the contents of $HOME to determine username and HOME directories for the mount points, and share names. combining it with smbpasswd as an authmethod, the server hosting the My Documents directory could then see when someone was logged in and pre auth the mount. Or you could have it done as a login script on the samba server. -----Original Message----- From: samba-bounces+mwray=s4f.com@lists.samba.org [mailto:samba-bounces+mwray=s4f.com@lists.samba.org]On Behalf Of Michael Kelly Sent: Thursday, November 18, 2004 11:43 AM To: samba@lists.samba.org Subject: [Samba] Connecting Suse9.2 to Samba shares in a windows network Hi All, Our office is running somes tests by introducing a couple of Linux workstations into the mix to see how they fair. I am however having some issues connecting these workstations to the shares offered by our Samba 3.02 server. I know that this is not really a samba issue, but I thought I might be able to get some help here to rectify my problems. I apologize if this is too far off topic for this list. Here is the setup: It is a basic workgroup network, no domain, with no PDC or anything of that sort. Authentication for the shares is done simply by having a macthing username/password on a win2000Pro workstation. The majority of shares on the server have the SUID and SGID set to a certain user for simplicity and to resolve the Microsoft Office file locking issues. However, each user's My Documents directory is a server share that is accessed automatically by way of the username used on the workstation. I have left out a few details, but they are unimportant. I do not want the users to have to mount any drives themselves on the Linux workstations so I would like them to be mounted automatically when the user logs in, not at boot time, but login time as these Linux workstations will be multiuser so will need to mount different My Documents directories. I have put the share definitions into fstab, but that will not do the My Documents correctly. I have also tried using autofs which works well for the regular shares, but again does not work for My Documents. I have found info on doing something similar with an NFS filesystem but nothing pertaining to smbfs and what I am trying to do with the My Documents share I am currently mounting them via a script that is called from .bashrc. This works, but it just does not seem very elegant and I know that it can be done better in Linux, I am just not sure how. I would like these tests to pass with flying colors to show the higher ups that Linux will work as a workstation, but having to write a custom script for each user to be able to mount the Samba shares will not help my case. As I said before, I need everything to happen at automatically as any people that will be working with these Linux workstations are not computer savy. Thanks for any ideas Michael Kelly -- To unsubscribe from this list go to the following URL and read the instructions: http://lists.samba.org/mailman/listinfo/samba
Michael Kelly
2004-Nov-18 18:56 UTC
[Samba] Connecting Suse9.2 to Samba shares in a windows network
Sounds good. I have looked at the [homes] share in samba but have not implemented it. I will do some research on that ans await the info from your smb.conf tomorrow. Thanks again Michael Kelly>>><joec@aracnet.com> 11/18 9:54 am >>>Michael Kelly <mkelly@victoria.komex.com> wrote :>Hi and thank you for your reply,>>I am reasonably knowledgeably about Linux. I tried using fstab askindof>a last resort, almost something you know is not going to work, but you>do it anyway out of frustration.Yup.. been there done that...>>I will explain a little further.>>The users who will be testing the Linux Workstations also have Windows>workstations, not dual boot, but a different machine. While on Windows,>these users My Documents directories are stored on the file server. To>the user, all data appearing to be stored in the local My Documents>directory is actually on the file server. When the user logs into their>Windows workstation they are connected to their My Documents directory>on the Samba file server by means of their username. I do not have>access to the smb.conf at this moment, but from what I remember this is>the share definition to achieve to above.Okay... makes perfect sense now! 1 - Create user accounts for all of your users on the linux stations 2 - Create a 'My Documents' directory on each account 3 - There is a smba share command that allows users to map directly to their own account. I think it is the [homes] share. There is a Craig Hunt Publishers book on Samba. This is one of the better ones out there. I am away from my home network, but I can send the link from my smb.conf file when I return home tomorrow. But I think the above will work. No scripts, just edits to your smb.conf file should do it. This is what I suspected you wanted to do. Thank you for verifying. Joe