LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-09-2003, 11:45 PM   #1
kith
Member
 
Registered: Jun 2003
Location: Texas - Houston
Distribution: Gentoo/FreeBSD
Posts: 109

Rep: Reputation: 15
Small Samba Question!


Hey all, Well i set up samba today, I got most of it working except one thing. I can see the samab server under my workgroup (WORKGROUP) However, I can't not write to it. Can't transfer files, and not sure why. Heres my smb.conf


(Samba is running of a FreeBSD 5.1 Server)


============SAMBA CONF===========


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 (perhaps too
# many!) 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 commentry 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]

# workgroup = NT-Domain-Name or Workgroup-Name, eg: REDHAT4
workgroup = WORKGROUP

# server string is the equivalent of the NT Description field
server string = Samba Server

# This option is important for security. It allows you to restrict
# connections to machines which are on your local network. The
# following example restricts access to two C class networks and
# the "loopback" interface. For more examples of the syntax see
# the smb.conf man page
; hosts allow = 192.168.1. 192.168.2. 127.

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

# you may wish to override the location of the printcap file
; printcap name = /etc/printcap

# on SystemV system setting printcap name to lpstat should allow
# you to automatically obtain a printer list from the SystemV spool
# system
; printcap name = lpstat

# It should not be necessary to specify the print system type unless
# it is non-standard. Currently supported print systems include:
# bsd, sysv, plp, lprng, aix, hpux, qnx
; printing = bsd

# Uncomment this if you want a guest account, you must add this to /etc/passwd
# otherwise the user "nobody" is used
; guest account = pcguest

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

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

# Security mode. Most people will want user level security. See
# security_level.txt for details.
security = user
# Use password server option only with security = server
; password server = <NT-Server-Name>

# You may wish to use password encryption. Please read
# ENCRYPTION.txt, Win95.txt and WinNT.txt in the Samba documentation.
# Do not enable this option unless you have read those documents
; encrypt passwords = yes

# 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 = /usr/local/etc/smb.conf.%m

# Most people will find that this option gives better performance.
# See speed.txt and the manual pages for details
socket options = TCP_NODELAY

# Configure Samba to use multiple interfaces
# If you have multiple network interfaces then you must list them
# here. See the man page for details.
; interfaces = 192.168.12.2/24 192.168.13.2/24

# Browser Control Options:
# set local master to no if you don't want Samba to become a master
# browser on your network. Otherwise the normal election rules apply
; local master = no

# OS Level determines the precedence of this server in master browser
# elections. The default value should be reasonable
; os level = 33

# Domain Master specifies Samba to be the Domain Master Browser. This
# allows Samba to collate browse lists between subnets. Don't use this
# if you already have a Windows NT domain controller doing this job
; domain master = yes

# Preferred Master causes Samba to force a local browser election on startup
# and gives it a slightly higher chance of winning the election
; preferred master = yes

# Use only if you have an NT server on your network that has been
# configured at install time to be a primary domain controller.
; domain controller = <NT-Domain-Controller-SMBName>

# Enable this if you want Samba to be a domain logon server for
# Windows95 workstations.
; domain logons = yes

# if you enable domain logons then you may want a per-machine or
# per user logon script
# run a specific logon batch file per workstation (machine)
; logon script = %m.bat
# run a specific logon batch file per username
; logon script = %U.bat

# Where to store roving profiles (only for Win95 and WinNT)
# %L substitutes for this servers netbios name, %U is username
# You must uncomment the [Profiles] share below
; logon path = \\%L\Profiles\%U

# Windows Internet Name Serving Support Section:
# WINS Support - Tells the NMBD component of Samba to enable it's WINS Server
; wins support = yes

# 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

# WINS Proxy - Tells Samba to answer name resolution queries on
# behalf of a non WINS capable client, for this to work there must be
# at least one WINS Server on the network. The default is NO.
; wins proxy = yes

# DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names
# via DNS nslookups. The built-in default for versions 1.9.17 is yes,
# this has been changed in version 1.9.18 to no.
dns proxy = no

# charset settings
; display charset = ASCII
; unix charset = ASCII
; dos charset = ASCII

#
#============================ Share Definitions ==============================
[homes]
comment = Home Directories
browseable = no
writeable = yes

# Un-comment the following and create the netlogon directory for Domain Logons
; [netlogon]
; comment = Network Logon Service
; path = /usr/local/samba/lib/netlogon
; guest ok = yes
; writeable = no
; share modes = no


# Un-comment the following to provide a specific roving profile share
# the default is to use the user's home directory
;[Profiles]
; path = /usr/local/samba/profiles
; browseable = no
; guest ok = yes


# NOTE: If you have a BSD-style print system there is no need to
# specifically define each individual printer
[printers]
comment = All Printers
path = /var/spool/samba
browseable = no
# Set public = yes to allow user 'guest account' to print
guest ok = no
writeable = no
printable = yes

# This one is useful for people to share files
;[tmp]
; comment = Temporary file space
; path = /tmp
; read only = no
; public = yes

# A publicly accessible directory, but read only, except for people in
# the "staff" group
;[public]
; comment = Public Stuff
; path = /home/samba
; public = yes
; writeable = yes
; printable = no
; write list = @staff

# Other examples.
#
# A private printer, usable only by fred. Spool data will be placed in fred's
# home directory. Note that fred must have write access to the spool directory,
# wherever it is.
;[fredsprn]
; comment = Fred's Printer
; valid users = fred
; path = /homes/fred
; printer = freds_printer
; public = no
; writeable = no
; printable = yes

# A private directory, usable only by fred. Note that fred requires write
# access to the directory.
;[fredsdir]
; comment = Fred's Service
; path = /usr/somewhere/private
; valid users = fred
; public = no
; writeable = yes
; printable = no

# a service which has a different directory for each machine that connects
# this allows you to tailor configurations to incoming machines. You could
# also use the %U option to tailor it by user name.
# The %m gets replaced with the machine name that is connecting.
;[pchome]
; comment = PC Directories
; path = /usr/pc/%m
; public = no
; writeable = yes

# A publicly accessible directory, read/write to all users. Note that all files
# created in the directory by users will be owned by the default user, so
# any user with access can delete any other user's files. Obviously this
# directory must be writeable by the default user. Another user could of course
# be specified, in which case all files would be owned by that user instead.
;[public]
; path = /tmp
; public = yes
; only guest = yes
; writeable = yes
; printable = no

# The following two entries demonstrate how to share a directory so that two
# users can place files there that will be owned by the specific users. In this
# setup, the directory should be writeable by both users and should have the
# sticky bit set on it to prevent abuse. Obviously this could be extended to
# as many users as required.
;[myshare]
; comment = Mary's and Fred's stuff
; path = /usr/somewhere/shared
; valid users = mary fred
; public = no
; writeable = yes
; printable = no
; create mask = 0765



---Some of the config I don't understand, so i left it default.
 
Old 08-10-2003, 03:57 AM   #2
andrewlkho
Member
 
Registered: Jul 2003
Location: London
Posts: 548

Rep: Reputation: 31
okay, you need to edit your smb.conf to set the valid users and whatnot - I presume that you're trying to write to the home directories, yes? If I were you, I'd use SWAT to configure it, but that's just because I'm lazy
 
Old 08-10-2003, 10:57 AM   #3
kith
Member
 
Registered: Jun 2003
Location: Texas - Houston
Distribution: Gentoo/FreeBSD
Posts: 109

Original Poster
Rep: Reputation: 15
Alright, I thought SWAT was the GUI interface for samba? If so, this server doesn't have X installed, just a command line heh.

(Unless I can use SWAT in windows, and connect to my server?)
 
Old 08-10-2003, 12:18 PM   #4
andrewlkho
Member
 
Registered: Jul 2003
Location: London
Posts: 548

Rep: Reputation: 31
yes, swat is the gui interface for samba. You need to be running samba as inetd not as a daemon as far as i remember to use swat. However, it can be accessed remotely. the point is that swat is a *web-based* interfaces, so you just point your browser at http://whatever:10000/ from *anywhere* [I can't remember what the exact port number was.
So no gui required.
 
Old 08-10-2003, 05:09 PM   #5
nxny
Member
 
Registered: May 2002
Location: AK - The last frontier.
Distribution: Red Hat 8.0, Slackware 8.1, Knoppix 3.7, Lunar 1.3, Sorcerer
Posts: 771

Rep: Reputation: 30
Quote:
--Some of the config I don't understand, so i left it default.
See man 5 smb.conf for configuration help.
Code:
What you need to do is use the following directives
# You may wish to use password encryption. Please read
# ENCRYPTION.txt, Win95.txt and WinNT.txt in the Samba documentation.
# Do not enable this option unless you have read those documents
   encrypt passwords = yes
   smb passwd file = /etc/samba/smbpasswd
.......
Code:
# The following are needed to allow password changing from Windows to
# update the Linux system password also.
# NOTE: Use these with 'encrypt passwords' and 'smb passwd file' above.
# NOTE2: You do NOT need these to allow workstations to change only
#        the encrypted SMB passwords. They allow the Unix password
#        to be kept in sync with the SMB password.
   unix password sync = No
   passwd program = /usr/bin/passwd %u
   passwd chat = *New*password* %n\n *Retype*new*password* %n\n *passwd:*all*authentication*toke
ns*updated*successfully*

# You can use PAM's password change control flag for Samba. If
# enabled, then PAM will be used for password changes when requested
# by an SMB client instead of the program listed in passwd program.
# It should be possible to enable this without changing your passwd
# chat parameter for most setups.

   #pam password change = yes

# Unix users can map to different SMB User names
  username map = /etc/samba/smbusers
Now create hand edit the smbusers file to map the windows usernames to the accounts in your account . And use smbpasswd to administer the smb passwords for the local usernames you intend to use.
 
Old 08-11-2003, 12:59 AM   #6
kith
Member
 
Registered: Jun 2003
Location: Texas - Houston
Distribution: Gentoo/FreeBSD
Posts: 109

Original Poster
Rep: Reputation: 15
Alright all, heres the run down. I got samba working, I can see the shares from all XP machines. However, when I enable guest mode, I can see all the files but can not write to the dir. Now, I am very confused how the users work. (I have been useing SWAT to set all this up) In swat, theres a box that says USERNAME under the shares section, now, I thought if i put one of the user names thats on the freebsd box in, it would use that password too (thought I read that some where) However, when I click the share, I can not edit the USERNAME feild it just says NETBIOS NAME/Guest (in this case Lust\Guest) Now, how do you add users and permissions?! I am also a little confused as to what the above poster said about users. Thanks in advanced!

-- I have tryed the smbpasswd program to add my self, but it says invalid password. Also when I look at the active connections in swat it says

Share User Group PID Client Date
IPC$ nobody nobody 2188 envy Sun Aug 10 10:17:35 2003


- nobody is the default guest account name. Now I am totaly confused Heh =D

----Sorry Heh, I keep Editing. In the smbpasswd file, it lists my user (envy) and its encrypted password. However it also lists the default Guest user nobody and next to his encrypted password it says UNPRILVIGED! =/ Still wondering why I can't edit the username feild when I click a share

Last edited by kith; 08-11-2003 at 01:35 AM.
 
Old 08-11-2003, 03:26 PM   #7
kith
Member
 
Registered: Jun 2003
Location: Texas - Houston
Distribution: Gentoo/FreeBSD
Posts: 109

Original Poster
Rep: Reputation: 15
/bump
 
Old 08-12-2003, 10:58 AM   #8
kith
Member
 
Registered: Jun 2003
Location: Texas - Houston
Distribution: Gentoo/FreeBSD
Posts: 109

Original Poster
Rep: Reputation: 15
/bump bump de bump bump =(
 
Old 08-12-2003, 01:48 PM   #9
JRandom
Member
 
Registered: Aug 2003
Location: Grand Junction, CO, USA
Distribution: Changes monthly. Also use Solaris, IRIX, and FreeBSD (and that's just at my house!)
Posts: 40

Rep: Reputation: 15
Kith,
 
Old 08-12-2003, 01:51 PM   #10
JRandom
Member
 
Registered: Aug 2003
Location: Grand Junction, CO, USA
Distribution: Changes monthly. Also use Solaris, IRIX, and FreeBSD (and that's just at my house!)
Posts: 40

Rep: Reputation: 15
Kith,

Are you using Windows ME or older to connect to the share? If so, your network/Samba usernames and passwords are stored in the c:\windows directory as xxxx.pwl (replace xxx with your username. Or for a quick fix, open up a command prompt and type:

del c:\windows\*.lwp

This will delete the saved password file. Been a while since I've used windows, but if I recall, this will also wipe out any logon screen and screen saver passwords as well.

--Eric
 
Old 08-12-2003, 01:51 PM   #11
kith
Member
 
Registered: Jun 2003
Location: Texas - Houston
Distribution: Gentoo/FreeBSD
Posts: 109

Original Poster
Rep: Reputation: 15
Useing Windows XP

Last edited by kith; 08-12-2003 at 02:12 PM.
 
Old 08-12-2003, 01:53 PM   #12
JRandom
Member
 
Registered: Aug 2003
Location: Grand Junction, CO, USA
Distribution: Changes monthly. Also use Solaris, IRIX, and FreeBSD (and that's just at my house!)
Posts: 40

Rep: Reputation: 15
Give it a shot and let me know how it goes.... BTW, what version of Windows?
 
Old 08-12-2003, 02:03 PM   #13
nxny
Member
 
Registered: May 2002
Location: AK - The last frontier.
Distribution: Red Hat 8.0, Slackware 8.1, Knoppix 3.7, Lunar 1.3, Sorcerer
Posts: 771

Rep: Reputation: 30
Kith, what do you have in your /etc/smb/smbusers file?
 
Old 08-12-2003, 02:13 PM   #14
kith
Member
 
Registered: Jun 2003
Location: Texas - Houston
Distribution: Gentoo/FreeBSD
Posts: 109

Original Poster
Rep: Reputation: 15
I have root - shows encrytped password a user called nobody, which i thikn is the default guest. and then the main user envy with the encrytped password, yet none of the passwords I try work
 
Old 08-12-2003, 02:19 PM   #15
JRandom
Member
 
Registered: Aug 2003
Location: Grand Junction, CO, USA
Distribution: Changes monthly. Also use Solaris, IRIX, and FreeBSD (and that's just at my house!)
Posts: 40

Rep: Reputation: 15
Kith, when you log onto windows (not over the network, but actually into Windows), what is your username? if it's not envy (or whatever) then it's probably gonna be guest. When you first log into windows be sure your not just pressing escape to get past the login screen..you should be typing envy and your password. If your not getting prompted for any of this when logging into Windows then you need to go to your Network Properties and make sure that the Default/Primary login is set to "Client for Microsoft Networks", and then reboot. I think your Samba host is working fine, it seems to me that the problem is with your windows box.

--Eric
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Small thing: starting samba for the first time. ditch* Linux - Networking 5 12-07-2004 07:19 AM
samba on small networks? e1000 Linux - Software 5 10-21-2003 07:17 PM
A very small, noobish Samba question Panzerfrost Linux - Networking 11 09-03-2003 04:18 AM
Small question Ed-Slack Linux From Scratch 1 01-08-2003 08:03 AM
a small question ericn Linux - Security 3 01-07-2002 05:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:43 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