LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   samba NetBIOS names problem (http://www.linuxquestions.org/questions/linux-networking-3/samba-netbios-names-problem-37732/)

dkodegwc 12-09-2002 08:16 AM

samba NetBIOS names problem
 
I have setup a samba server on the IP 192.168.1.101

When I go to \\192.168.1.101 on my win2k machine it pulls up the shares, when i go to \\FILESERVER it says network path not found...in my smb.conf FILESERVER is the netbios name of the samba server. How do i get the netbios names to work.

Another problem I am having is i did a fresh install of rh 7.2, this came with samba 2.2.1. After rh was setup i downloaded and compiled samba 2.2.7, now when i do smbclient -L 192.168.1.101 it says the samba server version is 2.2.1. What must I do to get the machine to use the NEW installation of samba instead of the old one.

thank you.

DavidPhillips 12-09-2002 05:56 PM

you should do rpm -e samba to remove samba befor updating it

dkodegwc 12-09-2002 06:00 PM

i fixed the netbios problem by setting up static ips on my network and then putting the machine names and IP's in /etc/hosts

the problem I am having now is I am attempting to setup samba as the PDC for my network....i setup everything in the smb.conf file and attempt to put darcstar for the domain to connect to in win2k. when i do this it tells me it cannot find the domain. why is this?

my linux box hostname is : crackmonkey.darcstar

where else on the linux box do i setup the domain?

DavidPhillips 12-09-2002 07:54 PM

it would be in smb.conf

workgroup = DARCSTAR
netbios name = CRACKMONKEY

DavidPhillips 12-09-2002 07:56 PM

Do this command


smbclient -L CRACKMONKEY

and see who the master is

dkodegwc 12-09-2002 11:30 PM

ok,

i got all this stuff working now....in order for win2k to find the domain I had to put in:
workgroup = darcstar

in smb.conf
I was able to join the domain and I supplied to username root and the root password.

But now when i rebooted windows, i selected darcstar as the domian, put in my username and password, but it says domain ... is not available.

it says this when i try the user i added or when i try to use root as the username..

any ideas?

I feel like I might be setting up the user accounts wrong maybe?
I added user sean like so:

useradd -g webusers sean$
smbpasswd -m -a sean$
smbpasswd -e sean$

and it said ok to all, now when i attempt to go to \\192.168.1.101 via command line, it asks me for username and password, user sean does not work but username root does and shows me the shares...

maybe I have more than one problem? i'm not sure...below is my smb.conf file:

[global]
admin users = root
encrypt passwords = yes
domain logons = yes
domain master = yes
logon drive = U:
logon home = \\FILESERVER\%u
os level = 99
preferred master = yes
security = user
netbios name = FILESERVER
workgroup = darcstar
log level = 2
log file = /var/log/samba.log
wins support = yes
add user script = /usr/sbin/useradd -d /dev/null -g machines -c 'Machine Account' -s /bin/false -M %u

[homes]
create mode = 0600
directory mode = 0700
path = %H
read only = no
valid users = %S

[sites]
create mode = 0600
directory mode = 0700
path = /home/sites
browseable = yes
writeable = yes
guest ok = no
read only = no

[netlogon]
comment = Network Logon Service
read only = yes
browseable = no
write list = @admins
path = /home/netlogon

DavidPhillips 12-10-2002 12:07 AM

you need to do

smbadduser user:user


when a user logs in on mine it put the users script in the netlogon folder, and puts the users files in the profiles folder. they need to have permission to write to the profiles folders


drwxrwx--- 5 root users 4096 Dec 9 05:59 profiles


groups david
david : david users

DavidPhillips 12-10-2002 12:11 AM

[netlogon]
path = /usr/lib/samba/netlogon/
root preexec = /usr/bin/ntlogon -u %U -g %G -o %a -d /usr/lib/samba/netlogon/ && chmod 644 /usr/lib/samba/netlogon/%U.bat;
root postexec = rm -f /usr/lib/samba/netlogon/%U.bat
read only = yes
write list = root

[profiles]
path = /usr/lib/samba/profiles/
read only = no
create mask = 0600
directory mask = 0700

[global]
domain master = Yes
domain logons = Yes
logon path = \\%N\profiles\nt\%u
logon home = \\%N\profiles\98\%u
logon script = %U.bat

DavidPhillips 12-10-2002 12:18 AM

ls -l /usr/lib/samba/profiles/nt
total 4
drwx------ 13 david david 4096 Dec 9 06:00 david

ls -l /usr/lib/samba/profiles
total 12
drwxrwx--- 3 root users 4096 Dec 7 14:44 98
drwxrwx--- 3 root users 4096 Dec 9 05:49 nt

ls -l /usr/lib/samba/profiles/nt/david
total 2228
drwx------ 7 david david 4096 Dec 9 05:50 Application Data
-rw------- 1 david david 680 Dec 8 23:51 config.bin
drwx------ 2 david david 4096 Dec 9 06:00 Cookies
drwx------ 2 david david 4096 Dec 9 05:49 Desktop
drwx------ 3 david david 4096 Dec 9 05:49 Favorites
-rw------- 1 david david 132 Dec 9 05:49 key.sah
drwx------ 4 david david 4096 Dec 9 05:49 My Documents
drwx------ 2 david david 4096 Dec 9 05:49 NetHood
-rw------- 1 david david 1835008 Dec 9 06:00 NTUSER.DAT
-rw------- 1 david david 1024 Dec 9 06:00 NTUSER.DAT.LOG
-rw------- 1 david david 270 Dec 9 06:00 ntuser.ini
-rw------- 1 david david 0 Dec 9 05:48 outfile.sah
drwx------ 2 david david 4096 Dec 9 05:49 PrintHood
drwx------ 2 david david 4096 Dec 9 05:49 Recent
-rw------- 1 david david 162 Dec 9 05:48 result_header.sah
drwx------ 2 david david 4096 Dec 9 06:00 SendTo
drwx------ 3 david david 4096 Dec 9 05:49 Start Menu
-rw------- 1 david david 4054 Dec 9 05:49 state.sah
drwx------ 2 david david 4096 Dec 9 05:49 Templates
-rw------- 1 david david 381 Dec 9 05:48 temp.sah
-rw------- 1 david david 381 Dec 9 05:48 user_info.sah
-rw------- 1 david david 32 Dec 8 23:51 version.sah
-rw------- 1 david david 356283 Dec 9 05:48 work_unit.sah

DavidPhillips 12-10-2002 12:29 AM

Ok, here is the whole thing

Code:


[global]
        workgroup = HOME
        netbios name = SERVER
        server string = Samba Server
        interfaces = 192.168.0.1/32 192.168.1.1/32
        encrypt passwords = Yes
        obey pam restrictions = Yes
        pam password change = Yes
        passwd program = /usr/bin/passwd %u
        passwd chat = *New*password* %n\n *Retype*new*password* %n\n *passwd:*al
l*authentication*tokens*updated*successfully*
        username map = /etc/samba/smbusers
        password level = 8
        username level = 3
        unix password sync = Yes
        log file = /var/log/samba/%m.log
        max log size = 0
        socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
        domain logons = Yes
        logon path = \\%N\profiles\nt\%u
        logon home = \\%N\profiles\98\%u
        logon script = %U.bat
        os level = 85
        preferred master = Yes
        domain master = Yes
        dns proxy = No
        wins support = Yes
        remote announce = 192.168.0.255 192.168.1.255
        hosts allow = 192.168.0. 192.168.1. 127.
        printing = lprng
        add user script = /usr/sbin/useradd -d /dev/null -g 100 -s /bin/false -M
 %u
[printers]
        comment = All Printers
        path = /var/spool/samba
        printable = Yes
        browseable = No

[HP890C]
        path = /var/spool/samba
        read only = No
        guest ok = Yes
        printable = Yes
        printer name = lp0
        oplocks = No

[netlogon]
        path = /usr/lib/samba/netlogon/
        root preexec = /usr/bin/ntlogon -u %U -g %G -o %a -d /usr/lib/samba/netl
ogon/ && chmod 644 /usr/lib/samba/netlogon/%U.bat;
        root postexec = rm -f /usr/lib/samba/netlogon/%U.bat
        read only = yes
        write list = root

[profiles]
        path = /usr/lib/samba/profiles/
        read only = no
        create mask = 0600
        directory mask = 0700


DavidPhillips 12-10-2002 12:32 AM

here is the ntlogon script

cat /etc/ntlogon.conf
Code:


[Global]

MAINDRIVE = G:
USERDRIVE = U:
SERVERNAME = SERVER
@ECHO "Welcome to our network!!!"
NET TIME \\%SERVERNAME /SET /YES
NET USE %USERDRIVE \\%SERVERNAME\profiles\nt\%U /YES



All times are GMT -5. The time now is 02:23 AM.