Samba

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • query about PC setups

    8 answers - 645 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    Hello,
    My boss claims that it is possible to set up a PC as a Samba client in such
    a way that every Windows user who logs in to that PC will automatically be
    connected to a certain designated Samba share, without the user himself
    having to map the network drive to the Samba share. That is, the boss
    claims that I, as the administrator of the PC, have the power to set up
    some kind of global mapping for all the PC users so that each user doesn't
    have to do the mapping himself. Is there any truth to this claim? I
    haven't found any mention of this feature in the Samba documentation.
    Thanks,
    Eric
  • No.1 | | 1012 bytes | |

    Eric Evans escreveu:
    Hello,

    My boss claims that it is possible to set up a PC as a Samba client in
    such a way that every Windows user who logs in to that PC will
    automatically be connected to a certain designated Samba share,
    without the user himself having to map the network drive to the Samba
    share. That is, the boss claims that I, as the administrator of the
    PC, have the power to set up some kind of global mapping for all the
    PC users so that each user doesn't have to do the mapping himself. Is
    there any truth to this claim? I haven't found any mention of this
    feature in the Samba documentation.

    Thanks,
    Eric

    With any windows/samba network you can do that. Any .bat script
    including "net use" commands when executed on client maps drives that
    way. It can be included alone on the client in any place that permits to
    run programs after logon or using logon scripts with a PDC (that are
    meant to do that).

    Edmundo Valle Neto
  • No.2 | | 835 bytes | |

    very easy to do with netlogon, you will have to create either a script
    for each user, or a global script for all if everyone will have the same
    mapping.

    Eric Evans wrote:
    Hello,

    My boss claims that it is possible to set up a PC as a Samba client in
    such a way that every Windows user who logs in to that PC will
    automatically be connected to a certain designated Samba share,
    without the user himself having to map the network drive to the Samba
    share. That is, the boss claims that I, as the administrator of the
    PC, have the power to set up some kind of global mapping for all the
    PC users so that each user doesn't have to do the mapping himself. Is
    there any truth to this claim? I haven't found any mention of this
    feature in the Samba documentation.

    Thanks,
    Eric
  • No.3 | | 2142 bytes | |

    Thanks for the info. I've been trying to get this to work but I'm having
    difficulty with it.

    I put the statement "logon script = startup.bat" in my [global] section. I
    also inserted

    [netlogon]
    path=/usr/local/samba/lib
    browseable = no
    share modes = no

    into the smb.conf. And I made a startup.bat which I placed in
    /usr/local/samba/lib, and which contains only the command "net use h:
    /homes". But when I log in to the PC, unfortunately it doesn't connect me
    to the homes share automatically like I thought it should. I checked the
    samba logs and I don't see any error messages there. Anybody have ideas
    about what I might be doing wrong?

    Thanks a lot,
    Eric


    >I use a 'startup.bat' file that runs at login
    >
    >logon script = startup.bat
    >
    >is my config line in smb.conf
    >
    >then for my [netlogon] parameters I have
    >
    >[netlogon]
    >path = /opt/samba/netlogon
    >browseable = No
    >share modes = No
    >
    >and in the startup.bat file placed in /opt/samba/netlogon
    >I have:
    >
    >net use h: /home
    >net use y: /CSLAB
    >net use x: /Accts
    >net use g: /STAFF
    >
    >something like that
    >
    >
    >
    >Eric Evans wrote:
    >>Hello,
    >>My boss claims that it is possible to set up a PC as a Samba client in
    >>such a way that every Windows user who logs in to that PC will
    >>automatically be connected to a certain designated Samba share, without
    >>the user himself having to map the network drive to the Samba share.
    >>That is, the boss claims that I, as the administrator of the PC, have the
    >>power to set up some kind of global mapping for all the PC users so that
    >>each user doesn't have to do the mapping himself. Is there any truth to
    >>this claim? I haven't found any mention of this feature in the Samba
    >>documentation.
    >>Thanks,
    >>Eric
    >>
  • No.4 | | 876 bytes | |

    I have a basic question about this, because I think I still don't really
    understand how this method works. When you set up the netlogon parameters
    and your startup.bat script, all that stuff is on the server side,
    right? So when you log on to your PC, how does the PC know that it's
    supposed to contact the server and download the startup.bat file? It seems
    to me that somehow you have to have some way of telling the PC that it
    needs to contact the Samba server to get the bat file.

    Eric

    >With any windows/samba network you can do that. Any .bat script including
    >"net use" commands when executed on client maps drives that way. It can be
    >included alone on the client in any place that permits to run programs
    >after logon or using logon scripts with a PDC (that are meant to do that).
  • No.5 | | 1452 bytes | |

    Thu, 6 Jul 2006, Eric Evans wrote:
    Thanks for the info. I've been trying to get this to work but I'm having
    difficulty with it.

    I put the statement "logon script = startup.bat" in my [global] section. I
    also inserted

    [netlogon]
    path=/usr/local/samba/lib
    browseable = no
    share modes = no

    into the smb.conf. And I made a startup.bat which I placed in
    /usr/local/samba/lib, and which contains only the command "net use h:
    /homes". But when I log in to the PC, unfortunately it doesn't connect me to
    the homes share automatically like I thought it should. I checked the samba
    logs and I don't see any error messages there. Anybody have ideas about what
    I might be doing wrong?

    startup.bat is a batch file that is going to be executed by
    the Windows machine when you logon to Windows. The Windows
    machine doesn't understand a command like "net use h: /homes"
    because "/homes" is a path that has meaning only on the Unix
    machine and doesn't mean anything to Windows.

    You're going to want something like "net use h: \\sambaserver\homes"
    instead.

    Also, it should be automatically connecting you to your home
    directory by virtue of having "logon path" and "logon drive"
    specified in smb.conf, so you don't need to add a "net use"
    command for your home directory. It's only needed for other
    shares.

    - Logan
  • No.6 | | 1043 bytes | |

    At 16:47 06/07/2006, you wrote:
    >Thanks for the info. I've been trying to get this to work but I'm having difficulty with it.
    >
    >I put the statement "logon script = startup.bat" in my [global] section. I also inserted
    >
    >[netlogon]
    >path=/usr/local/samba/lib
    >browseable = no
    >share modes = no
    >
    >into the smb.conf. And I made a startup.bat which I placed in /usr/local/samba/lib, and which contains only the command "net use h: /homes". But when I log in to the PC, unfortunately it doesn't connect me to the homes share automatically like I thought it should. I checked the samba logs and I don't see any error messages there. Anybody have ideas about what I might be doing wrong?
    >
    >Thanks a lot,
    >Eric


    works if you configure your samba server to be a PDC and connect your workstations otherwise login scripts don't function. Have you got your Samba configuration setup for Domain security?

    Sandy
  • No.7 | | 2241 bytes | |

    >As I mentioned in my last email and as explained below, the use of login
    >scripts in the netlogon share only work when the samba server is acting as
    >a PDC and your clients are part of this domain. Windows clients then
    >automatically look for the existence of the netlogon share and run the
    >script mentioned in the smb.conf. The users home directory will be
    >automatically mapped using the drive letter completed in the smb.conf.

    drives can then be added using net use or you can use kixtart which
    >is a great scripting program which allows you to be more creative with
    >your scripting. Stick with net use if its just basic mapping your after.


    Thanks very much. We've never used domain logins before but I looked up in
    the "Using Samba" book about how to set up the Samba server as a domain
    controller. Here's the contents of my [global] section of my smb.conf:

    [global]
    workgroup = Plab
    domain logons = yes

    socket options = TCP_NDELAY
    invalid users = root bin daemon adm sync shutdown halt mail news uucp
    max log size = 100
    security = user
    encrypt passwords = yes
    os level = 34
    local master = yes
    preferred master = yes
    domain master = yes

    print command = /bin/lp -d%p %s; sleep 5; rm -f %s
    printer = 128_1
    printing = SYSV

    log file = /var/log/samba.log
    log level = 0
    max log size = 50
    debug timestamp = yes
    logon script = startup.bat

    Now I have two stupid questions:

    1. When I go into one of my Windows 2000 clients and try to set it up to be
    a member of the Plab domain, I get an error message saying that it's not
    able to contact the Plab domain. But I thought I had the Samba server set
    up properly to be a PDC. I don't see any error messages in the Samba log
    file. Is there any way I can test the Samba server to see if it's actually
    operating as a PDC?

    2. We also have Windows XP clients but I'm not able to find how to set them
    up to be in the Plab domain. Anybody know how to configure XP clients for
    domain logons?

    Thanks very much,
    Eric
  • No.8 | | 3165 bytes | |

    Eric Evans escreveu:
    >
    >As I mentioned in my last email and as explained below, the use of
    >login scripts in the netlogon share only work when the samba server
    >is acting as a PDC and your clients are part of this domain. Windows
    >clients then automatically look for the existence of the netlogon
    >share and run the script mentioned in the smb.conf. The users home
    >directory will be automatically mapped using the drive letter
    >completed in the smb.conf. drives can then be added using net
    >use or you can use kixtart which is a great scripting program which
    >allows you to be more creative with your scripting. Stick with net
    >use if its just basic mapping your after.
    >

    Thanks very much. We've never used domain logins before but I looked
    up in the "Using Samba" book about how to set up the Samba server as a
    domain controller. Here's the contents of my [global] section of my
    smb.conf:

    Using samba is a reference to the Samba 2 branch (although some things
    remains the same), Samba 3 has two books (available online), The
    Samba-3 Howto and Reference Guide, and Samba by Example.

    [global]
    workgroup = Plab
    domain logons = yes

    socket options = TCP_NDELAY
    invalid users = root bin daemon adm sync shutdown halt mail
    news uucp
    max log size = 100
    security = user
    encrypt passwords = yes
    os level = 34
    local master = yes
    preferred master = yes
    domain master = yes

    print command = /bin/lp -d%p %s; sleep 5; rm -f %s
    printer = 128_1
    printing = SYSV

    log file = /var/log/samba.log
    log level = 0
    max log size = 50
    debug timestamp = yes
    logon script = startup.bat

    Now I have two stupid questions:

    1. When I go into one of my Windows 2000 clients and try to set it up
    to be a member of the Plab domain, I get an error message saying that
    it's not able to contact the Plab domain. But I thought I had the
    Samba server set up properly to be a PDC.

    Can be a lot of things, browsing, lack of guest user, the nmbd logs
    should show how elections are going.

    I don't see any error messages in the Samba log file.

    Put a log level = 2, 0 doesn't log anything.

    Is there any way I can test the Samba server to see if it's actually
    operating as a PDC?

    smbclient -L localhost -U% should show if you can list the resource of
    the server locally and show who is the master browser.

    I recommend you to use the samba server as a WINS server too (if it will
    be always available), and configure the clients to use it.

    The books have step by step examples on how to set up an test a PDC.

    2. We also have Windows XP clients but I'm not able to find how to set
    them up to be in the Plab domain. Anybody know how to configure XP
    clients for domain logons?

    The books shows that too including pictures of the dialogs on the client
    and the scripts needed in the server, how to set privileges, etc.

    Thanks very much,
    Eric

    Edmundo Valle Neto

Re: query about PC setups


max 4000 letters.
Your nickname that display:
In order to stop the spam: 5 + 4 =
QUESTION ON "Samba"

EMSDN.COM