LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-25-2006, 04:46 PM   #1
shorto
Member
 
Registered: Jul 2006
Distribution: Debian 6.0.2.1 i386
Posts: 111

Rep: Reputation: 15
Samba on Debain complitley stuck...


Hi!

I was wondering does anybody have a simple manual how to install samba? I have 2 other Windows PC's and one Debian server and just want to see (and edit, cut, paste of course) the files on all the computers. I'm new at this so looking at manuals with 500 pages is a real downer, and I lose all hope of making this work just as I open it. Or is there another program that allowes you to make this? Please help!

Thank you in advance,
shorto
 
Old 10-25-2006, 04:49 PM   #2
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
http://www.aboutdebian.com/lan.htm

The samba setup is further down the page. The one trick I always struggle with is getting the proper samba users/passwords setup. I usually just have to bungle my way through until it works...
 
Old 10-25-2006, 05:35 PM   #3
shorto
Member
 
Registered: Jul 2006
Distribution: Debian 6.0.2.1 i386
Posts: 111

Original Poster
Rep: Reputation: 15
I folowed the maunal but i just cant seem to get the server on my Windows PC... Is there another way to test the samba out to see if windows are stupid like usual or is it my stupidity that won today
 
Old 10-25-2006, 05:47 PM   #4
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
Did you restart samba after making the changes?

You can try just typing in the server's IP address into Windows Explorer.
 
Old 10-25-2006, 11:18 PM   #5
shorto
Member
 
Registered: Jul 2006
Distribution: Debian 6.0.2.1 i386
Posts: 111

Original Poster
Rep: Reputation: 15
i restarted it but still nothing

even if i type in the inter ip (192.168.0.1) it just opens my homepage of apache is there something special that i need to do besides entering the ip?
 
Old 10-26-2006, 10:49 AM   #6
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
I think you need to do \\192.168.0.1. I believe the two backslashes look for a network neighborhood type server.

Can you post your smb.conf file?
 
Old 10-29-2006, 07:39 AM   #7
shorto
Member
 
Registered: Jul 2006
Distribution: Debian 6.0.2.1 i386
Posts: 111

Original Poster
Rep: Reputation: 15
It says it cannot find the spacific location

here's the config:
Quote:
#
# Sample configuration file for the Samba suite for Debian GNU/Linux.
#
#
# This is the main Samba configuration file. You should read the
# smb.conf(5) manual page in order to understand the options listed
# here. Samba has a huge number of configurable options most of which
# are not shown in this example
#
# Any line which starts with a ; (semi-colon) or a # (hash)
# is a comment and is ignored. In this example we will use a #
# for commentary and a ; for parts of the config file that you
# may wish to enable
#
# NOTE: Whenever you modify this file you should run the command
# "testparm" to check that you have not many any basic syntactic
# errors.
#

#======================= Global Settings =======================

[global]

## Browsing/Identification ###

# Change this to the workgroup/NT-domain name your Samba server will part of
workgroup = WORKGROUP

# server string is the equivalent of the NT Description field
server string = %h server (Samba %v)

# Windows Internet Name Serving Support Section:
# WINS Support - Tells the NMBD component of Samba to enable its WINS Server
; wins support = no

# WINS Server - Tells the NMBD components of Samba to be a WINS Client
# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
; wins server = w.x.y.z

# This will prevent nmbd to search for NetBIOS names through DNS.
dns proxy = no

# What naming service and in what order should we use to resolve host names
# to IP addresses
; name resolve order = lmhosts host wins bcast


#### Debugging/Accounting ####

# This tells Samba to use a separate log file for each machine
# that connects
log file = /var/log/samba/log.%m

# Put a capping on the size of the log files (in Kb).
max log size = 1000

# If you want Samba to only log through syslog then set the following
# parameter to 'yes'.
; syslog only = no

# We want Samba to log a minimum amount of information to syslog. Everything
# should go to /var/log/samba/log.{smbd,nmbd} instead. If you want to log
# through syslog you should set the following parameter to something higher.
syslog = 0

# Do something sensible when Samba crashes: mail the admin a backtrace
panic action = /usr/share/samba/panic-action %d


####### Authentication #######

# "security = user" is always a good idea. This will require a Unix account
# in this server for every user accessing the server. See
# /usr/share/doc/samba-doc/htmldocs/ServerType.html in the samba-doc
# package for details.
; security = user

# You may wish to use password encryption. See the section on
# 'encrypt passwords' in the smb.conf(5) manpage before enabling.
encrypt passwords = false

# If you are using encrypted passwords, Samba will need to know what
# password database type you are using.
passdb backend = tdbsam guest

obey pam restrictions = yes

; guest account = nobody
invalid users = root

# This boolean parameter controls whether Samba attempts to sync the Unix
# password with the SMB password when the encrypted SMB password in the
# passdb is changed.
; unix password sync = no

# For Unix password sync to work on a Debian GNU/Linux system, the following
# parameters must be set (thanks to Augustin Luton <aluton@hybrigenics.fr> for
# sending the correct chat script for the passwd program in Debian Potato).
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n .

# This boolean controls whether PAM will be used for password changes
# when requested by an SMB client instead of the program listed in
# 'passwd program'. The default is 'no'.
; pam password change = no


########## Printing ##########

# If you want to automatically load your printer list rather
# than setting them up individually then you'll need this
; load printers = yes

# lpr(ng) printing. You may wish to override the location of the
# printcap file
; printing = bsd
; printcap name = /etc/printcap

# CUPS printing. See also the cupsaddsmb(8) manpage in the
# cupsys-client package.
; printing = cups
; printcap name = cups

# When using [print$], root is implicitly a 'printer admin', but you can
# also give this right to other users to add drivers and set printer
# properties
; printer admin = @ntadmin


######## File sharing ########

# Name mangling options
preserve case = yes
short preserve case = yes


############ Misc ############

# Using the following line enables you to customise your configuration
# on a per machine basis. The %m gets replaced with the netbios name
# of the machine that is connecting
; include = /home/samba/etc/smb.conf.%m

# Most people will find that this option gives better performance.
# See smb.conf(5) and /usr/share/doc/samba-doc/htmldocs/speed.html
# for details
# You may want to add the following on a Linux system:
# SO_RCVBUF=8192 SO_SNDBUF=8192
socket options = TCP_NODELAY

# The following parameter is useful only if you have the linpopup package
# installed. The samba maintainer and the linpopup maintainer are
# working to ease installation and configuration of linpopup and samba.
; message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' &

# Domain Master specifies Samba to be the Domain Master Browser. If this
# machine will be configured as a BDC (a secondary logon server), you
# must set this to 'no'; otherwise, the default behavior is recommended.
; domain master = auto

# Some defaults for winbind (make sure you're not using the ranges
# for something else.)
; idmap uid = 10000-20000
; idmap gid = 10000-20000
; template shell = /bin/bash

#======================= Share Definitions =======================
[files]
comment = Shared Files
path = /home/shorto
writable = yes
guest ok = yes

[homes]
comment = Home Directories
browseable = no

# By default, the home directories are exported read-only. Change next
# parameter to 'yes' if you want to be able to write to them.
writable = no

# File creation mask is set to 0700 for security reasons. If you want to
# create files with group=rw permissions, set next parameter to 0775.
create mask = 0700

# Directory creation mask is set to 0700 for security reasons. If you want to
# create dirs. with group=rw permissions, set next parameter to 0775.
directory mask = 0700

# Un-comment the following and create the netlogon directory for Domain Logons
# (you need to configure Samba to act as a domain controller too.)
;[netlogon]
; comment = Network Logon Service
; path = /home/samba/netlogon
; guest ok = yes
; writable = no
; share modes = no

[printers]
comment = All Printers
browseable = no
path = /tmp
printable = yes
public = no
writable = no
create mode = 0700

# Windows clients look for this share name as a source of downloadable
# printer drivers
[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
browseable = yes
read only = yes
guest ok = no
# Uncomment to allow remote administration of Windows print drivers.
# Replace 'ntadmin' with the name of the group your admin users are
# members of.
; write list = root, @ntadmin

# A sample share for sharing your CD-ROM with others.
;[cdrom]
; comment = Samba server's CD-ROM
; writable = no
; locking = no
; path = /cdrom
; public = yes

# The next two parameters show how to auto-mount a CD-ROM when the
# cdrom share is accesed. For this to work /etc/fstab must contain
# an entry like this:
#
# /dev/scd0 /cdrom iso9660 defaults,noauto,ro,user 0 0
#
# The CD-ROM gets unmounted automatically after the connection to the
#
# If you don't want to use auto-mounting/unmounting make sure the CD
# is mounted on /cdrom
#
; preexec = /bin/mount /cdrom
; postexec = /bin/umount /cdrom
 
Old 10-30-2006, 11:12 AM   #8
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
Okay, here's what I would do: make a copy of your smb.conf file to back it up. Then create a new smb.conf file with only the following contents
Code:
[global]
	workgroup = WORKGROUP 
[test] 
	comment = For testing only, please
	path = /home/shorto/test
	read only = no
	guest ok = yes
Now make sure you create a directory in your home called "test" and make sure you change WORKGROUP to whatever your Windows machine has for it's WORKGROUP. Then run the command testparm as root and restart the samba server to get it working. This should give you a simple samba share that you can access.

After you get this working, you can make a more complex sharing scheme for your printer and whatnot.
 
Old 11-12-2006, 10:27 AM   #9
shorto
Member
 
Registered: Jul 2006
Distribution: Debian 6.0.2.1 i386
Posts: 111

Original Poster
Rep: Reputation: 15
thank you, but I don't think I'm going to continiue to try with samba anymore, becouse today I got hacked and they came in via samba, so is there another program that could make this work?
 
Old 11-13-2006, 08:31 PM   #10
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
If you are certain your box got compromised don't think but repartition, reformat and reinstall from scratch. Then properly harden the box. If you are unsure, please read and act on Intruder Detection Checklist (CERT): http://www.cert.org/tech_tips/intrud...checklist.html and open a thread in the Linux Security forum if you want help.
 
Old 11-15-2006, 07:33 PM   #11
Reptile
LQ Newbie
 
Registered: Oct 2006
Location: Bay Area, CA
Distribution: Red Hat ES, Fedora, FreeBSD, Solaris
Posts: 10

Rep: Reputation: 0
Quote:
Originally Posted by shorto
thank you, but I don't think I'm going to continiue to try with samba anymore, becouse today I got hacked and they came in via samba, so is there another program that could make this work?
Keep in mind that Samba, by nature, is just like all other programs. It's not "secure" or "insecure", it's only going to be as secure as you make it. My advice would be to learn more about Samba, get lots of experience with it and Linux in general, and get your home environment working. Any protocol or program you'd put in Samba's place would have the same issue: there will always be a way to hack in. You just have to be as knowledgable as you can in order to harden that sucker and keep yourself as secure as you can be.

(P.S. I'd start by saving the logs from your current system before you format. Figure out how you were hacked this time, and you can learn to avoid that kind of thing in the future.)
 
Old 03-27-2007, 07:12 PM   #12
gvaught
Member
 
Registered: Sep 2003
Location: MidWest
Distribution: Debian GNU/Linux 8 (jessie)
Posts: 199

Rep: Reputation: 30
Have you read this?

If you got compromised, it wasn't because you had Samba running. As mentioned above, it's because you *didn't* have something else set correctly (probably in either permissions or in your firewall). Having a Samba server which is visible to the outside world (not behind a firewall) is a BAD idea unless you're prepared to have the box hacked and exploited OR you've got your security tighter than a... well, let's just say it won't leak water.

I'm sure there are plenty out there who would say it's possible, but I would strongly advise against having a file server that is not restricted to the local network. At least, until you've got it working AND you have a very strong confidence in your security setup.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
getting debain linuxjamil Debian 2 08-15-2006 03:56 PM
need help with vsftpd on debain booboo1 Linux - Newbie 3 04-19-2005 03:07 PM
debain AGilley007 Debian 7 07-18-2004 06:55 PM
Another problem with samba. I'm stuck lostboy Linux - General 4 06-23-2003 07:28 AM
Samba help pleases - stuck in read only _TK_ Linux - Networking 1 04-07-2001 08:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration