[Samba] net drive mapping not working in login script

Chris Boyd Chris.Boyd at usit.ie
Fri Apr 7 11:14:06 GMT 2006


To answer craig. I've corrected the dos syntax in the login scripts but they don't seem to be running. 

Here's the whole smb.conf 

[global]
        printcap name = cups
        cups options = raw
        map to guest = Bad User
#       include = /etc/samba/dhcp.conf
        logon path = \\%L\profiles\.msprofile
        logon home = \\%L\%U\.9xprofile
        logon drive = P:
        security = user
        restrict anonymous = no
        domain master = Yes
        preferred master = Yes
#       idmap uid = 15000-20000
#       idmap gid = 15000-20000
        log level = 2
        netbios name = UCD01
        max protocol = NT
        ldap ssl = No
        server signing = Auto
        workgroup = UCD
        add machine script = /usr/sbin/useradd  -c Machine -d /var/lib/nobody -s /bin/false %m$
        passdb backend = tdbsam
        domain logons = Yes
        local master = Yes
        os level = 65

[protel]
        comment = Protel Data Folder
        path = /protel
#       drive = K:
        read only = no
[homes]
        comment = Home Directories
        valid users = %S
        browseable = No
        read only = No
        inherit acls = Yes

[profiles]
        comment = Network Profiles Service
        path = /var/lib/samba/profiles
        read only = No
        store dos attributes = Yes
        create mask = 0600
        directory mask = 0700

[users]
        comment = All users
path = /home
        read only = No
        inherit acls = Yes
        veto files = /aquota.user/groups/shares/

[groups]
        comment = All groups
        path = /home/groups
        read only = No
        inherit acls = Yes

[printers]
        comment = All Printers
        path = /var/tmp
        printable = Yes
        create mask = 0600
        browseable = No

[print$]
        comment = Printer Drivers
        path = /var/lib/samba/drivers
        write list = @ntadmin root
        force group = ntadmin
        create mask = 0664
        directory mask = 0775

[netlogon]
        comment = Network Logon Service
        path = /var/lib/samba/netlogon
        write list = root
        admin users = root
        guest ok = Yes
        browseable = No


ls -la /var/lib/samba/netlogon/
total 21
drwxr-xr-x  3 root root 224 Apr  7 12:13 .
drwxr-xr-x  6 root root 680 Apr  7 12:16 ..
-rwxr--r--  1 root root 179 Apr  7 12:10 aillin.bat
-rwxr--r--  1 root root 179 Apr  7 12:10 geraldine.bat
-rwxr--r--  1 root root 179 Apr  7 12:10 kay.bat
-rwxr--r--  1 root root 179 Apr  7 12:10 reception.bat
-rwxr--r--  1 root root 181 Apr  7 12:09 robin.bat
drwxr-xr-x  2 root root  80 Apr  6 12:05 scripts


Chris Boyd
Systems Engineer
USIT 
19-21 Aston Quay
Dublin 2
Ireland

Tel: +353 1 6021670
Fax: +353 1 6771602
www.usit.ie
>>> "Mont Rothstein" <mont.rothstein at gmail.com> 04/06/06 5:51 PM >>>
Do your user's home directories already exist?  Then need to.  Samba does
not by defult auto-create them.

If you want to auto-create them options include:
1) A preexec in the [homes] section
2) Create them as part of the add user script
3) Use pam_mkhomedir

-Mont


On 4/6/06, Chris Boyd <Chris.Boyd at usit.ie> wrote:
>
> I've set the path for each user in pdbedit and created a login script with
> drive mapping etc etc
> The network drives aren't being mapped when I login each user:
> smb.conf
> [global]
>         printcap name = cups
>         cups options = raw
>         map to guest = Bad User
> #       include = /etc/samba/dhcp.conf
>         logon path = \\%L\profiles\.msprofile
>         logon home = \\%L\%U\.9xprofile
>         logon drive = P:
>
>
> [protel]
>         comment = Protel Data Folder
>         path = /protel
> #       drive = K:
>         read only = no
> [netlogon]
>         comment = Network Logon Service
>         path = /var/lib/samba/netlogon
>         write list = root
>         admin users = root
>         guest ok = Yes
>         browseable = No
>
> pdbedit -L -v
>
> Unix username:        aillin
> NT username:
> Account Flags:        [U          ]
> User SID:             S-1-5-21-1439502771-4027299746-1242570080-3004
> Primary Group SID:    S-1-5-21-1439502771-4027299746-1242570080-513
> Full Name:            aillin
> Home Directory:       \\ucd01\aillin\.9xprofile
> HomeDir Drive:        P:
> Logon Script:         \\ucd01\netlogon\aillin.bat
> Profile Path:         \\ucd01\profiles\.msprofile
> Domain:               UCD
> Account desc:
> Workstations:
>
> vim /vavr/lib/samba/netlogon/aillin.bat
>
> echo Setting Current Time...
> net time UCD01 /set /yes
>
> echo Mapping Network Drives to StressFree File Server UCD01...
> net use k: UCD01protel
> net use s: UCD01share
> #net use t: EXAMPLESERVERtemp
>
>
>
> Chris Boyd
> Systems Engineer
> USIT
> 19-21 Aston Quay
> Dublin 2
> Ireland
>
> Tel: +353 1 6021670
> Fax: +353 1 6771602
> www.usit.ie
>
> -----------------------------------------------------------------
> This email message is intended only for the addressee(s)
> and contains information that may be confidential and/or
> copyrighted.  If you are not the intended recipient please
> notify the sender by reply email and immediately delete
> this email. Use, disclosure or reproduction of this email
> by anyone other than the intended recipient(s) is strictly
> prohibited. USIT has scanned this email for viruses and
> dangerous content and believes it to be clean. However,
> virus scanning is ultimately the responsibility of the recipient.
> -----------------------------------------------------------------
>
> --
> To unsubscribe from this list go to the following URL and read the
> instructions:  https://lists.samba.org/mailman/listinfo/samba
>


-----------------------------------------------------------------
This email message is intended only for the addressee(s) 
and contains information that may be confidential and/or 
copyrighted.  If you are not the intended recipient please 
notify the sender by reply email and immediately delete 
this email. Use, disclosure or reproduction of this email 
by anyone other than the intended recipient(s) is strictly 
prohibited. USIT has scanned this email for viruses and 
dangerous content and believes it to be clean. However, 
virus scanning is ultimately the responsibility of the recipient.
-----------------------------------------------------------------



More information about the samba mailing list