Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
someone help newb to setup samba ?? [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
playahater
Guru
Guru


Joined: 02 Jul 2005
Posts: 382
Location: Serbia

PostPosted: Fri Oct 28, 2005 12:06 am    Post subject: someone help newb to setup samba ?? [SOLVED] Reply with quote

Hey guys .. for start .. just to say that i have never been working with sharing files between two computers under linux ..
i`ve been trying to set samba .. but .. with not so much success .. :(
I have compiled it with no problems .. so far .. :)
i have laptop .. Debian and another PC .. WindowsXP ..
I have problem seting up samba on gentoo ..

here is my samba.conf
Code:


[global]
# Replace MYWORKGROUPNAME with your workgroup/domain
workgroup = GENTOO
# Of course this has no REAL purpose other than letting
# everyone knows it's not Windows!
# %v prints the version of Samba we are using.
server string = Samba Server %v
# We are going to use cups, so we are going to put it in here ;-)
printcap name = cups
# We want a log file and we do not want it to get bigger than 50kb.
log file = /var/log/samba/log.%m
max log size = 50
# We are going to set some options for our interfaces...
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
# This is a good idea, what we are doing is binding the
# samba server to our local network.
# For example, if eth0 is our local network device
interfaces = lo eth0
bind interfaces only = yes
# Now we are going to specify who we allow, we are afterall
# very security conscience, since this configuration does
# not use passwords!
hosts allow = 127.0.0.1 192.168.254.0/24
hosts deny = 0.0.0.0/0
# Other options for this are USER, DOMAIN, ADS, and SERVER
# The default is user
security = share
# No passwords, so we're going to use a guest account!
guest account = samba
guest ok = yes
# We now will implement the on access virus scanner.
# NOTE: By putting this in our [Global] section, we enable
# scanning of ALL shares, you could optionally move
# these to a specific share and only scan it.

# For Samba 3.x. This enables ClamAV on access scanning.
#vfs object = vscan-clamav
#vscan-clamav: config-file = /etc/samba/vscan-clamav.conf

# Now we setup our print drivers information!
#[print$]
#comment = Printer Drivers
#path = /etc/samba/printer # this path holds the driver structure
# Modify this to "username,root" if you don't want root to
# be the only printer admin)
#write list = playahater

# Now we'll setup a printer to share, while the name is arbitrary
# it should be consistent throughout Samba and CUPS!
#[HPDeskJet5150]
#comment = HP DeskJet 5150 Network Printer
#printable = yes
#path = /var/spool/samba
# Modify this to "username,root" if you don't want root to
# be the only printer admin)
#printer admin = playahater

# Now we setup our printers share.  This should be
# browseable, printable, public.
#[printers]
#comment = All Printers
#printable = yes
#path = /var/spool/samba
# Modify this to "username,root" if you don't want root to
# be the only printer admin)
#printer admin = playahater

# We create a new share that we can read/write to from anywhere
# This is kind of like a public temp share, anyone can do what
# they want here.
[public]
comment = Public Files
create mask = 0766
path = /home/samba/public

[STUFF]
path = /Stuff
guest account = adm
case sensitive = no
msdfs proxy = no


and rc-status

Code:

playahater@localhost ~ $ rc-status
Runlevel: default
 xdm                                                           [ started ]
 local                                                         [ started ]
 samba                                                           [   off ]
 vixie-cron                                                    [ started ]
 syslog-ng                                                     [ started ]
 lm_sensors                                                    [ started ]
 domainname                                                    [ started ]
 coldplug                                                      [ started ]
 net.eth0                                                      [ started ]
 netmount                                                      [ started ]


and samba log
Code:

[2005/10/28 00:41:27, 0] smbd/server.c:main(798)
  smbd version 3.0.14a started.
  Copyright Andrew Tridgell and the Samba Team 1992-2004
[2005/10/28 00:41:27, 0] printing/print_cups.c:cups_cache_reload(85)
  Unable to connect to CUPS server localhost - Connection refused
[2005/10/28 00:41:27, 0] printing/print_cups.c:cups_cache_reload(85)
  Unable to connect to CUPS server localhost - Connection refused
[2005/10/28 00:41:27, 1] auth/auth_util.c:make_server_info_sam(840)
  User samba in passdb, but getpwnam() fails!
[2005/10/28 01:03:19, 0] smbd/server.c:main(798)
  smbd version 3.0.14a started.
  Copyright Andrew Tridgell and the Samba Team 1992-2004
[2005/10/28 01:03:19, 0] param/loadparm.c:lp_do_parameter(3162)
  Global parameter guest account found in service section!
[2005/10/28 01:03:19, 0] printing/print_cups.c:cups_cache_reload(85)
  Unable to connect to CUPS server localhost - Connection refused
[2005/10/28 01:03:19, 0] printing/print_cups.c:cups_cache_reload(85)
  Unable to connect to CUPS server localhost - Connection refused
[2005/10/28 01:03:19, 1] auth/auth_util.c:make_server_info_sam(840)
  User samba in passdb, but getpwnam() fails!
[2005/10/28 01:07:04, 0] smbd/server.c:main(798)
  smbd version 3.0.14a started.
  Copyright Andrew Tridgell and the Samba Team 1992-2004
[2005/10/28 01:07:04, 0] param/loadparm.c:lp_do_parameter(3162)
  Global parameter guest account found in service section!
[2005/10/28 01:07:04, 0] printing/print_cups.c:cups_cache_reload(85)
  Unable to connect to CUPS server localhost - Connection refused
[2005/10/28 01:07:04, 0] printing/print_cups.c:cups_cache_reload(85)
  Unable to connect to CUPS server localhost - Connection refused
[2005/10/28 01:07:04, 1] auth/auth_util.c:make_server_info_sam(840)
  User samba in passdb, but getpwnam() fails!
[2005/10/28 01:16:16, 0] smbd/server.c:main(798)
  smbd version 3.0.14a started.
  Copyright Andrew Tridgell and the Samba Team 1992-2004
[2005/10/28 01:16:16, 0] param/loadparm.c:lp_do_parameter(3162)
  Global parameter guest account found in service section!
[2005/10/28 01:16:16, 0] printing/print_cups.c:cups_cache_reload(85)
  Unable to connect to CUPS server localhost - Connection refused
[2005/10/28 01:16:16, 0] printing/print_cups.c:cups_cache_reload(85)
  Unable to connect to CUPS server localhost - Connection refused
[2005/10/28 01:16:16, 1] auth/auth_util.c:make_server_info_sam(840)
  User samba in passdb, but getpwnam() fails!
[2005/10/28 01:17:46, 0] smbd/server.c:main(798)
  smbd version 3.0.14a started.
  Copyright Andrew Tridgell and the Samba Team 1992-2004
[2005/10/28 01:17:46, 0] param/loadparm.c:lp_do_parameter(3162)
  Global parameter guest account found in service section!
[2005/10/28 01:17:46, 0] printing/print_cups.c:cups_cache_reload(85)
  Unable to connect to CUPS server localhost - Connection refused
[2005/10/28 01:17:46, 0] printing/print_cups.c:cups_cache_reload(85)
  Unable to connect to CUPS server localhost - Connection refused
[2005/10/28 01:17:46, 1] auth/auth_util.c:make_server_info_sam(840)
  User samba in passdb, but getpwnam() fails!
[2005/10/28 01:23:59, 0] smbd/server.c:main(798)
  smbd version 3.0.14a started.
  Copyright Andrew Tridgell and the Samba Team 1992-2004
[2005/10/28 01:23:59, 0] param/loadparm.c:lp_do_parameter(3162)
  Global parameter guest account found in service section!
[2005/10/28 01:24:00, 0] printing/print_cups.c:cups_cache_reload(85)
  Unable to connect to CUPS server PrintServer - Success
[2005/10/28 01:24:00, 0] printing/print_cups.c:cups_cache_reload(85)
  Unable to connect to CUPS server PrintServer - Success
[2005/10/28 01:24:00, 1] auth/auth_util.c:make_server_info_sam(840)
  User samba in passdb, but getpwnam() fails!
[2005/10/28 01:49:00, 0] smbd/server.c:main(798)
  smbd version 3.0.14a started.
  Copyright Andrew Tridgell and the Samba Team 1992-2004
[2005/10/28 01:49:00, 0] param/loadparm.c:lp_do_parameter(3162)
  Global parameter guest account found in service section!
[2005/10/28 01:49:01, 0] printing/print_cups.c:cups_cache_reload(85)
  Unable to connect to CUPS server PrintServer - Success
[2005/10/28 01:49:01, 0] printing/print_cups.c:cups_cache_reload(85)
  Unable to connect to CUPS server PrintServer - Success
[2005/10/28 01:49:01, 1] auth/auth_util.c:make_server_info_sam(840)
  User samba in passdb, but getpwnam() fails!


I have followed the samba/cups tutorial from gentoo docs ..
For start I want to share files between Xp and Gnetoo .. i have created network under XP and named it GENTOO ..

What else should I do in order to make this thing work .. ?? .. have I missed something .. ??

P.S.- if there is too much to explain .. some link would be usefull too ..

10x in advance .. :)
_________________
http://droopia.net


Last edited by playahater on Sat Oct 29, 2005 10:52 pm; edited 1 time in total
Back to top
View user's profile Send private message
mikecore
Guru
Guru


Joined: 29 Dec 2003
Posts: 342
Location: Toledo, Ohio

PostPosted: Fri Oct 28, 2005 1:03 am    Post subject: Reply with quote

try

Code:


          /etc/init.d/samba start

          rc-update add samba default



you just need to start the service and add it to your default config for startup
Back to top
View user's profile Send private message
playahater
Guru
Guru


Joined: 02 Jul 2005
Posts: 382
Location: Serbia

PostPosted: Fri Oct 28, 2005 1:07 am    Post subject: Reply with quote

mikecore wrote:
try

Code:


          /etc/init.d/samba start

          rc-update add samba default



you just need to start the service and add it to your default config for startup


Yes .. I did that .. and this is what happens ..

Code:

localhost Desktop # /etc/init.d/samba start
 * samba -> start: smbd ...                                         [ !! ]
 * samba -> start: nmbd ...                                         [ ok ]
 * Error: stopping services (see system logs)
 * samba -> stop: smbd ...                                          [ !! ]
 * samba -> stop: nmbd ...                                          [ !! ]
localhost Desktop # 


I i can`t find the reason why nmbd is starting OK .. and smbd is not .. :roll:
_________________
http://droopia.net
Back to top
View user's profile Send private message
mikecore
Guru
Guru


Joined: 29 Dec 2003
Posts: 342
Location: Toledo, Ohio

PostPosted: Fri Oct 28, 2005 3:49 am    Post subject: Reply with quote

i see your samba server is bond to your lo and eth0 are they up?

and I don't bond mine and its works fine try commenting those out
Back to top
View user's profile Send private message
playahater
Guru
Guru


Joined: 02 Jul 2005
Posts: 382
Location: Serbia

PostPosted: Fri Oct 28, 2005 12:37 pm    Post subject: Reply with quote

yes .. ofcourse they`re up .. I use eth0 ( through router ) for internet .. and it`s working just fine .. and I plan to use eth0 for other two pc`s .. although i thing that lo is working to without any problems ..
Maybe the router is messing up my lan ?? ... i want to connect to XP through router .. XP has its own ip adress .. and i think that router has no wote on that .. ?? .. right ?? .. or maybe it has ??

is it possible that i have set up everything OK .. and that samba is not just working ?? .. i think not .. ?? ..
is there any other *.config that i should look ?? .. did I cover all setting options ??

Code:

localhost playahater # ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:50:8D:F1:40:E8
          inet addr:192.168.254.2  Bcast:192.168.254.255  Mask:255.255.255.0
          inet6 addr: fe80::250:8dff:fef1:40e8/64 Scope:Link
          UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:134127 errors:0 dropped:0 overruns:0 frame:0
          TX packets:119158 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:148129299 (141.2 Mb)  TX bytes:9127229 (8.7 Mb)
          Interrupt:16 Base address:0xe000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:12 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:600 (600.0 b)  TX bytes:600 (600.0 b)

sit0      Link encap:IPv6-in-IPv4
          NOARP  MTU:1480  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

localhost playahater #   
 

_________________
http://droopia.net
Back to top
View user's profile Send private message
playahater
Guru
Guru


Joined: 02 Jul 2005
Posts: 382
Location: Serbia

PostPosted: Sat Oct 29, 2005 1:45 pm    Post subject: Reply with quote

Hmmm .. one question .. :)
my rc-update show shows

Code:
localhost playahater # rc-update show
           alsasound |      default
            bootmisc | boot
             checkfs | boot
           checkroot | boot
               clock | boot
            coldplug |      default
         consolefont | boot
         crypto-loop |
               cupsd |      default
                dbus |
          domainname | boot default
                famd |
                 gpm |
                hald |
              hdparm |
            hostname | boot
             hotplug |
               ivman |
             keymaps | boot
                lisa |
          lm_sensors |      default
               local |      default nonetwork
          localmount | boot
            mldonkey |
             modules | boot
            net.eth0 |      default
              net.lo | boot
            netmount |      default
                nscd |
             numlock |
             portmap |
             pwcheck |
             reslisa |
           rmnologin | boot
              rsyncd |
               samba |      default
           saslauthd |
                sshd |
           syslog-ng |      default
             urandom | boot
          vixie-cron |      default
                 xdm |      default


I was wandering if in "local" line should stay "nonetwork .. should I delete it from there .. and leave only default .. is that maybe messing up samba ?? ..

10x
_________________
http://droopia.net
Back to top
View user's profile Send private message
JSharku
Apprentice
Apprentice


Joined: 09 Feb 2003
Posts: 189
Location: Belgium

PostPosted: Sat Oct 29, 2005 2:02 pm    Post subject: Reply with quote

Have you created and enabled all the necessary smb accounts? I see 'samba' and 'adm', maybe there are more I overlooked, anyway they have to be created using smbpasswd. These smb accounts are not the same as unix accounts (the ones you create with adduser) so even if these accounts exist in your /etc/passwd they might not be in the /var/lib/samba/private/smbpasswd file.

PS: in the listing, nonetwork next to local means that local will be the only service started when you start the nonetwork runlevel, but that isn't the cause of samba not starting; see also http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=4 for more info on how the gentoo runlevel system works.

Sharku
_________________
If only life were portage-driven:
Code:
USE="-bitch -in-laws nice gorgeous smart" emerge girlfriend
*sigh*
--
Open Source for Windows!
Back to top
View user's profile Send private message
playahater
Guru
Guru


Joined: 02 Jul 2005
Posts: 382
Location: Serbia

PostPosted: Sat Oct 29, 2005 2:26 pm    Post subject: Reply with quote

/var/lib/samba/private/smbpasswd
Code:

root:0: ......
playahater:1000: ......


/etc/passwd
Code:
root:x:0:0:root:/root:/bin/bash
bin:x:1:1:bin:/bin:/bin/false
daemon:x:2:2:daemon:/sbin:/bin/false
adm:x:3:4:adm:/var/adm:/bin/false
lp:x:4:7:lp:/var/spool/lpd:/bin/false
sync:x:5:0:sync:/sbin:/bin/sync
shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown
halt:x:7:0:halt:/sbin:/sbin/halt
mail:x:8:12:mail:/var/spool/mail:/bin/false
news:x:9:13:news:/usr/lib/news:/bin/false
uucp:x:10:14:uucp:/var/spool/uucppublic:/bin/false
operator:x:11:0:operator:/root:/bin/bash
man:x:13:15:man:/usr/share/man:/bin/false
postmaster:x:14:12:postmaster:/var/spool/mail:/bin/false
cron:x:16:16:cron:/var/spool/cron:/bin/false
ftp:x:21:21::/home/ftp:/bin/false
sshd:x:22:22:sshd:/dev/null:/bin/false
at:x:25:25:at:/var/spool/cron/atjobs:/bin/false
squid:x:31:31:Squid:/var/cache/squid:/bin/false
gdm:x:32:32:GDM:/var/lib/gdm:/bin/false
xfs:x:33:33:X Font Server:/etc/X11/fs:/bin/false
games:x:35:35:games:/usr/games:/bin/false
named:x:40:40:bind:/var/bind:/bin/false
mysql:x:60:60:mysql:/var/lib/mysql:/bin/false
postgres:x:70:70::/var/lib/postgresql:/bin/bash
nut:x:84:84:nut:/var/state/nut:/bin/false
cyrus:x:85:12::/usr/cyrus:/bin/false
vpopmail:x:89:89::/var/vpopmail:/bin/false
alias:x:200:200::/var/qmail/alias:/bin/false
qmaild:x:201:200::/var/qmail:/bin/false
qmaill:x:202:200::/var/qmail:/bin/false
qmailp:x:203:200::/var/qmail:/bin/false
qmailq:x:204:201::/var/qmail:/bin/false
qmailr:x:205:201::/var/qmail:/bin/false
qmails:x:206:201::/var/qmail:/bin/false
postfix:x:207:207:postfix:/var/spool/postfix:/bin/false
smmsp:x:209:209:smmsp:/var/spool/mqueue:/bin/false
portage:x:250:250:portage:/var/tmp/portage:/bin/false
nobody:x:65534:65534:nobody:/:/bin/false
playahater:x:1000:100::/home/playahater:/bin/bash
rpc:x:111:111:added by portage for portmap:/dev/null:/bin/false
p2p:x:101:100:added by portage for mldonkey:/home/p2p:/bin/bash
messagebus:x:102:407:added by portage for dbus:/dev/null:/bin/false
haldaemon:x:103:408:added by portage for hal:/dev/null:/bin/false


I think that smbpasswd file is OK ..
right ??
_________________
http://droopia.net
Back to top
View user's profile Send private message
JSharku
Apprentice
Apprentice


Joined: 09 Feb 2003
Posts: 189
Location: Belgium

PostPosted: Sat Oct 29, 2005 2:57 pm    Post subject: Reply with quote

It should be if you were using the root and playahater accounts, but you're not, from your smb.conf file I see:
Code:
# No passwords, so we're going to use a guest account!
guest account = samba

...

[STUFF]
path = /Stuff
guest account = adm
Either change them to an existing account or make these accounts.


Sharku
_________________
If only life were portage-driven:
Code:
USE="-bitch -in-laws nice gorgeous smart" emerge girlfriend
*sigh*
--
Open Source for Windows!
Back to top
View user's profile Send private message
playahater
Guru
Guru


Joined: 02 Jul 2005
Posts: 382
Location: Serbia

PostPosted: Sat Oct 29, 2005 10:51 pm    Post subject: Reply with quote

JSharku wrote:
It should be if you were using the root and playahater accounts, but you're not, from your smb.conf file I see:
Code:
# No passwords, so we're going to use a guest account!
guest account = samba
...
[STUFF]
path = /Stuff
guest account = adm
Either change them to an existing account or make these accounts.

Sharku


Yep .. u were .. ofcourse .. right .. :) .. it was the user who was making problems .. i`ve put the right user in smb.conf and

Code:
playahater@localhost ~ $ rc-status
Runlevel: default
 xdm                                                               [ started ]
 cupsd                                                             [ started ]
 local                                                             [ started ]
 samba                                                             [ started ]
 vixie-cron                                                        [ started ]
 syslog-ng                                                         [ started ]
 lm_sensors                                                        [ started ]
 domainname                                                        [ started ]
 coldplug                                                          [ started ]
 net.eth0                                                          [ started ]
 netmount                                                          [ started ]
 alsasound                                                         [ started ]
playahater@localhost ~ $


10x .. again ..

Cheers
_________________
http://droopia.net
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum