# Windows still not detecting my printserver. (SOLVED)

## Caesars727

I am still having difficulty getting windows to detect my network and printer on my linux machine.

Im using Samba, and have started both smbd and nmbd.

How can I check to make sure samba is working on computer with gentoo??  what about my XP box??

Thank you very much, I can post any files you figure are important.

AlLast edited by Caesars727 on Sun Dec 21, 2003 8:30 pm; edited 1 time in total

----------

## mad man moon

This should show you, if samba is started:

```
/etc/init.d/samba status
```

Look up here for printing from windows via cups.

https://forums.gentoo.org/viewtopic.php?t=102330

It worked for me, without using samba.

----------

## hoochiepapa

testparm will   check your samba config file

run smbclient -L  hostname of your samba server

----------

## Caesars727

testparm seemed ok, i guess   :Crying or Very sad: 

take a look at this

```
bash-2.05b# smbclient -L Alex

added interface ip=192.168.1.100 bcast=192.168.1.255 nmask=255.255.255.0

Connection to Alex failed

```

----------

## Caesars727

testparm yields

```
bash-2.05b# testparm

Load smb config files from /etc/samba/smb.conf

Processing section "[homes]"

Unknown parameter encountered: "   comment"

Ignoring unknown parameter "   comment"

Unknown parameter encountered: "   browseable"

Ignoring unknown parameter "   browseable"

Unknown parameter encountered: "   writable"

Ignoring unknown parameter "   writable"

Processing section "[Profiles]"

Unknown parameter encountered: "        comment"

Ignoring unknown parameter "        comment"

Unknown parameter encountered: "        path"

Ignoring unknown parameter "        path"

Unknown parameter encountered: "        browseable"

Ignoring unknown parameter "        browseable"

Unknown parameter encountered: "        writeable"

Ignoring unknown parameter "        writeable"

No path in service Profiles - using /tmp

Processing section "[printers]"

Unknown parameter encountered: "   comment"

Ignoring unknown parameter "   comment"

Unknown parameter encountered: "   path"

Ignoring unknown parameter "   path"

Unknown parameter encountered: "   browseable"

Ignoring unknown parameter "   browseable"

Unknown parameter encountered: "   guest ok"

Ignoring unknown parameter "   guest ok"

Unknown parameter encountered: "   writable"

Ignoring unknown parameter "   writable"

Unknown parameter encountered: "   printable"

Ignoring unknown parameter "   printable"

Unknown parameter encountered: "   create mode"

Ignoring unknown parameter "   create mode"

Unknown parameter encountered: "   print command"

Ignoring unknown parameter "   print command"

WARNING: [printers] service MUST be printable!

No path in service printers - using /tmp

Processing section "[print$]"

Unknown parameter encountered: "   path"

Ignoring unknown parameter "   path"

Unknown parameter encountered: "   browseable"

Ignoring unknown parameter "   browseable"

Unknown parameter encountered: "   read only"

Ignoring unknown parameter "   read only"

Unknown parameter encountered: "   write list"

Ignoring unknown parameter "   write list"

Unknown parameter encountered: "   comment"

Ignoring unknown parameter "   comment"

Unknown parameter encountered: "   path"

Ignoring unknown parameter "   path"

Unknown parameter encountered: "   read only"

Ignoring unknown parameter "   read only"

Unknown parameter encountered: "   public"

Ignoring unknown parameter "   public"

No path in service print$ - using /tmp

Loaded services file OK.

Press enter to see a dump of your service definitions

```

----------

## Caesars727

here is the rest of "testparm"

```
Press enter to see a dump of your service definitions

# Global parameters

[global]

        coding system =

        client code page = 850

        code page directory = /var/lib/samba/codepages

        workgroup = ALEX1

        netbios name =

        netbios aliases =

        netbios scope =

        server string = Gentoo Linux Server

        interfaces = eth0

        bind interfaces only = Yes

        security = USER

        encrypt passwords = Yes

        update encrypted = No

        allow trusted domains = Yes

        hosts equiv =

        min passwd length = 5

        map to guest = Never

        null passwords = No

        obey pam restrictions = No

        password server =

        smb passwd file = /etc/samba/private/smbpasswd

        root directory =

        pam password change = No

        passwd program = /usr/bin/passwd

        passwd chat = *new*password* %n\n *new*password* %n\n *changed*

        passwd chat debug = No

        username map =

        password level = 0

        username level = 0

        unix password sync = No

        restrict anonymous = No

        lanman auth = Yes

        use rhosts = No

        ssl = No

        ssl hosts =

        ssl hosts resign =

        ssl CA certDir =

        ssl CA certFile =

        ssl server cert =

        ssl server key =

        ssl client cert =

        ssl client key =

        ssl egd socket =

        ssl entropy file =

        ssl entropy bytes = 256

        ssl require clientcert = No

        ssl require servercert = No

        ssl ciphers =

        ssl version = ssl2or3

        ssl compatibility = No

        admin log = No

        log level = 1

        syslog = 1

        syslog only = No

        log file = /var/log/samba/log.%m

        max log size = 5000

        timestamp logs = Yes

        debug hires timestamp = No

        debug pid = No

        debug uid = No

        protocol = NT1

        large readwrite = Yes

        max protocol = NT1

        min protocol = CORE

        read bmpx = No

        read raw = No

        write raw = Yes

        acl compatibility =

        nt smb support = Yes

        nt pipe support = Yes

        nt status support = Yes

        announce version = 4.9

        announce as = NT

        max mux = 50

        max xmit = 16644

        name resolve order = lmhosts host bcast

        max ttl = 259200

        max wins ttl = 518400

        min wins ttl = 21600

        time server = No

        unix extensions = No

        change notify timeout = 60

        deadtime = 0

        getwd cache = Yes

        keepalive = 300

        lpq cache time = 10

        max smbd processes = 0

        max disk size = 0

        max open files = 10000

        name cache timeout = 660

        read size = 16384

        socket options = IPTOS_LOWDELAY TCP_NODELAY

        stat cache size = 50

        use mmap = Yes

        total print jobs = 0

        load printers = Yes

        printcap name = /etc/printcap

        disable spoolss = No

        enumports command =

        addprinter command =

        deleteprinter command =

        show add printer wizard = Yes

        os2 driver map =

        strip dot = No

        mangling method = hash

        character set =

        mangled stack = 50

        stat cache = Yes

        domain admin group =

        domain guest group =

        machine password timeout = 604800

        add user script =

        delete user script =

        logon script =

        logon path = \\%N\%U\profile

        logon drive =

        logon home = \\%N\%U

        domain logons = No

        os level = 65

        lm announce = Auto

        lm interval = 60

        preferred master = Yes

        local master = Yes

        domain master = Yes

        browse list = Yes

        enhanced browsing = Yes

        dns proxy = No

        wins proxy = No

        wins server =

        wins support = No

        wins hook =

        kernel oplocks = Yes

        lock spin count = 3

        lock spin time = 10

        oplock break wait time = 0

        add share command =

        change share command =

        delete share command =

        config file =

        preload =

        lock dir = /var/cache/samba

        pid directory = /var/run/samba

        utmp directory =

        wtmp directory =

        utmp = No

        default service =

        message command =

        dfree command =

        valid chars =

        remote announce =

        remote browse sync =

        socket address = 0.0.0.0

        homedir map =

        time offset = 0

        NIS homedir = No

        source environment =

        panic action =

        hide local users = No

        host msdfs = No

        winbind uid =

        winbind gid =

        template homedir = /home/%D/%U

        template shell = /bin/false

        winbind separator = \

        winbind cache time = 15

        winbind enum users = Yes

        winbind enum groups = Yes

        winbind use default domain = No

        comment =

        path =

        alternate permissions = No

        username =

        guest account = nobody

        invalid users =

        valid users =

        admin users =

        read list =

        write list =

        printer admin =

        force user =

        force group =

        read only = Yes

        create mask = 0644

        force create mode = 00

        security mask = 0777

        force security mode = 00

        directory mask = 0755

        force directory mode = 00

        directory security mask = 0777

        force directory security mode = 00

        force unknown acl user = 00

        inherit permissions = No

        inherit acls = No

        guest only = No

        guest ok = No

        only user = No

        hosts allow = 192.168.1.4 127.0.0.1 localhost

        hosts deny = ALL

        status = Yes

        nt acl support = Yes

        profile acls = No

        block size = 1024

        max connections = 0

        min print space = 0

        strict allocate = No

        strict sync = No

        sync always = No

        use sendfile = No

        write cache size = 262144

        max print jobs = 1000

        printable = No

        postscript = No

        printing = bsd

        print command = lpr -r -P%p %s

        lpq command = lpq -P%p

        lprm command = lprm -P%p %j

        lppause command =

        lpresume command =

        queuepause command =

        queueresume command =

        printer name =

        use client driver = No

        default devmode = No

        printer driver =

        printer driver file = /etc/samba/printers.def

        printer driver location =

        default case = lower

        case sensitive = No

        preserve case = Yes

        short preserve case = Yes

        mangle case = No

        mangling char = ~

        hide dot files = Yes

        hide unreadable = No

        delete veto files = No

        veto files =

        hide files =

        veto oplock files =

        map system = No

        map hidden = No

        map archive = Yes

        mangled names = Yes

        mangled map =

        browseable = Yes

        blocking locks = Yes

        csc policy = manual

        fake oplocks = No

        locking = Yes

        oplocks = Yes

        level2 oplocks = Yes

        oplock contention limit = 2

        posix locking = Yes

        strict locking = No

        share modes = Yes

        copy =

        include =

        exec =

        preexec close = No

        postexec =

        root preexec =

        root preexec close = No

        root postexec =

        available = Yes

        volume =

        fstype = NTFS

        set directory = No

        wide links = Yes

        follow symlinks = Yes

        dont descend =

        magic script =

        magic output =

        delete readonly = No

        dos filemode = No

        dos filetimes = No

        dos filetime resolution = No

        fake directory create times = No

        vfs object =

        vfs options =

        msdfs root = No

[homes]

[Profiles]

        path = /tmp

[printers]

        path = /tmp

        printable = Yes

        browseable = No

[print$]

        path = /tmp

```

----------

## Caesars727

One more thing that is of importence.

I have conntected these two machines by way of linksys wireless access point rounter.  (my windows comp is connected via the wireless conection)

----------

## hoochiepapa

smbclient -L failed -- samba isn't  running.

probably from errors in the config file.

did you  use swat  to configure samba?

----------

## Caesars727

here is /etc/samba/smb.conf

```
# Samba config file created using SWAT

# from UNKNOWN (127.0.0.1)

# Date: 2003/12/18 16:38:41

# Global parameters

[global]

   workgroup = ALEX1

   server string = Gentoo Linux Server

   interfaces = eth0

   bind interfaces only = Yes

   encrypt passwords = Yes

   log level = 1

   log file = /var/log/samba/log.%m

   read raw = No

   name resolve order = lmhosts host bcast

   socket options = IPTOS_LOWDELAY TCP_NODELAY

   os level = 65

   preferred master = Yes

   domain master = Yes

   dns proxy = No

   create mask = 0644

   hosts allow = 192.168.1.4 127.0.0.1 grunt0331

   hosts deny = ALL

   write cache size = 262144

#[printers]

#   comment = All Printer

#   path = /var/spool/samba

#   printable = Yes

#   browseable = No

[homes] 

    comment = Home Directories 

    browseable = no 

    writable = yes 

 [Profiles] 

         comment = Profiles %L - %m - %U 

         path = /home/profile 

         browseable = No 

         writeable = yes 

 

 [printers] 

    comment = All Printers 

    path = /var/spool/samba 

    browseable = no 

 # to allow user 'guest account' to print. 

    guest ok = yes 

    writable = no 

    printable = yes 

    create mode = 0700 

    print command = lpr -P %p -o raw %s -r   # using client side printer drivers. 

 [print$] 

    path = /var/lib/samba/printers 

    browseable = yes 

    read only = yes 

    write list = @adm root 

 

 # This one is useful for people to share files 

 ;[tmp] 

    comment = Temporary file space      

    path = /tmp                

    read only = no          

    public = yes
```

----------

## Caesars727

??

----------

## hoochiepapa

 *Caesars727 wrote:*   

> ??

 

 is samba running?  smbd and nmbd?

what's in the logs? /var/log/samba/log.smbd

----------

## Caesars727

Well, there is too much in it to post here, but this is the tail end of it 

```
[2003/12/20 13:08:53, 0] lib/access.c:check_access(333)

  Denied connection from 192.168.1.101 (192.168.1.101)

[2003/12/20 13:08:53, 1] smbd/process.c:process_smb(839)

  Connection denied from 192.168.1.101

[2003/12/20 13:08:54, 1] lib/util_sock.c:get_socket_name(977)

  Gethostbyaddr failed for 192.168.1.101

[2003/12/20 13:08:54, 0] lib/access.c:check_access(333)

  Denied connection from 192.168.1.101 (192.168.1.101)

[2003/12/20 13:08:54, 1] smbd/process.c:process_smb(839)

  Connection denied from 192.168.1.101

[2003/12/20 13:08:54, 1] lib/util_sock.c:get_socket_name(977)

  Gethostbyaddr failed for 192.168.1.101

[2003/12/20 13:08:54, 0] lib/access.c:check_access(333)

  Denied connection from 192.168.1.101 (192.168.1.101)

[2003/12/20 13:08:54, 1] smbd/process.c:process_smb(839)

  Connection denied from 192.168.1.101

```

I think im all screwed up.  I really appreaciate the help

----------

## Caesars727

oh, and yes, samba is running, both smbd and nmbd

----------

## barbar

Did you change the password on your samba-clients or on the samba-server ?

----------

## Caesars727

barbar, honestly, im not sure.  

How would i check??

----------

## barbar

The Passwords are encrypted. So I guess there is no easy way to find it out.

```
smbpasswd -a USERNAME 
```

you add a new user. you are prompted for the password

```
smbpasswd -e USERNAME
```

 enables a previously disabled account.

Before you can add a samba-user you must add this user as linux-user (useradd).

----------

## Caesars727

Ok, yes, i do have my user acct added.

the name is "alex"

whats next  :Very Happy:   :Question: 

----------

## barbar

/etc/init.d/samba restart

make sure the password for login on xp is the same as smbpasswd. You must add a networkprinter in xp.

tail -f /var/log/samba/log.smbd 

restart xp and check the logging if user alex gets access to samba[/code]

----------

## Caesars727

Ok, im gonna try that...

I was not aware that my passwords had to match....

Thanks again.

----------

## Caesars727

OK, just tried that, and again, nothing.....

I am thankful for the help.  I am very new to linux, and although I have most things working, I am constantely consulting the forum and docs...I know very little on my own.

I get confused with all the naming of things with samba.  

samba accounts, xp accounts, domainname, hostname etc etc.....

----------

## Caesars727

ttt

----------

## barbar

Yes the learning curve using linux, especially Gentoo is steep. I found this online book about samba very informative.

I think you are close to a breakthrough.

Please post the output of 

```
tail -f /var/log/samba/log.smbd
```

 when the XP machine tries to connect with the server

----------

## Caesars727

As far as connecting, i would correct in going to "my network places" in windows, and selecting "view workgroup computers"??

If so, the message windows gives me is "Alex1 is not accesable. You might not have permissions to view this resource. Contact the administrator of this server to find out if you have access permissions.   The network path was not found"

Going to gentoo right after that, I get this from " tail -f /var/log/samba/log.smbd"

```
ash-2.05b$ tail -f /var/log/samba/log.smbd

[2003/12/21 10:59:34, 0] lib/access.c:check_access(333)

  Denied connection from 192.168.1.101 (192.168.1.101)

[2003/12/21 10:59:34, 1] smbd/process.c:process_smb(839)

  Connection denied from 192.168.1.101

[2003/12/21 10:59:34, 1] lib/util_sock.c:get_socket_name(977)

  Gethostbyaddr failed for 192.168.1.101

[2003/12/21 10:59:34, 0] lib/access.c:check_access(333)

  Denied connection from 192.168.1.101 (192.168.1.101)

[2003/12/21 10:59:34, 1] smbd/process.c:process_smb(839)

  Connection denied from 192.168.1.101

[2003/12/21 11:00:14, 1] lib/util_sock.c:get_socket_name(977)

  Gethostbyaddr failed for 192.168.1.101

[2003/12/21 11:00:14, 0] lib/access.c:check_access(333)

  Denied connection from 192.168.1.101 (192.168.1.101)

[2003/12/21 11:00:14, 1] smbd/process.c:process_smb(839)

  Connection denied from 192.168.1.101

[2003/12/21 11:00:14, 1] lib/util_sock.c:get_socket_name(977)

  Gethostbyaddr failed for 192.168.1.101

[2003/12/21 11:00:14, 0] lib/access.c:check_access(333)

  Denied connection from 192.168.1.101 (192.168.1.101)

[2003/12/21 11:00:14, 1] smbd/process.c:process_smb(839)

  Connection denied from 192.168.1.101

[2003/12/21 11:00:14, 1] lib/util_sock.c:get_socket_name(977)

  Gethostbyaddr failed for 192.168.1.101

[2003/12/21 11:00:14, 0] lib/access.c:check_access(333)

  Denied connection from 192.168.1.101 (192.168.1.101)

[2003/12/21 11:00:14, 1] smbd/process.c:process_smb(839)

  Connection denied from 192.168.1.101

```

----------

## hoochiepapa

Gethostbyaddr failed for 192.168.1.101

do you  have a hostname for 192.168.1.101  in /etc/hosts?

----------

## barbar

Your client can not access the samba server.

Replace the Line

```
hosts allow = 192.168.1.4 127.0.0.1 grunt0331
```

 in your /etc/samba/smb.conf

with 

```
hosts allow = 192.168.1.0/24,localhost
```

 do not forget to restart samba and check with the tail -f ... if the client can logon.

----------

## Caesars727

 :Very Happy:   :Very Happy:   :Very Happy: 

THANKS GUYS !!!!!!!!!!!!!!!!!!!!!!!!!

I added 192.168.1.101 to  " /etc/hosts"

and then 

Replace the Line

Code:

hosts allow = 192.168.1.4 127.0.0.1 grunt0331

in your /etc/samba/smb.conf 

with 

Code:

hosts allow = 192.168.1.0/24,localhost

And restarted samba, restarted windows, and its all there!!!!!!!!!!!!!

Damn, thanks so much guys....this is GREAT!!!!!!!

----------

## Caesars727

ttt for the guys that helped me!

One last thing.  Even though i could see the files from my windows box, and even though I set up the Adobe driver on windows, I could not print, eiither from windows or gentoo.  

Went to the http://localhost:631/admin and deleted the printer and reinstalled it.

Everything works great.

----------

