[Samba] (again) - problem with users

Glaanieboy

OSNN Veteran Addict
#1
Yesterday I reinstalled my server, because of some hardware issues. Among the programs I reinstalled is Samba. I successfully configured Samba the last time, it let me use a network share with no problems. But now when I want to open a share on my server, it asks me to type in a username/password combination, while the username and password on both the FreeBSD box and my Windows XP box are the same. When I type in the username and password, it gives the error as you can see in the attached file. I went to the log.<windows_box_name> file, and there I saw the following error, each time I tried logging in:
Code:
[2004/05/24 20:35:50, 0] smbd/password.c:authorise_login(863)
  authorise_login: rejected invalid user nobody
I don't understand why it's trying to authorise user nobody, while I type in the username of glenn.
Of course I first did 'smbpasswd -a glenn' to make the user in the Samba environment (with the same password as my Windows box).
security has been set to user and password encryption has been set on yes.

I am lost, maybe someone can help me?
 

Attachments

cpugeniusmv

Computer Genius
#6
make sure that the user you're trying to connect with (nobody for anonymous logins) has permission to get into and/or read/write files in it. couldn't hurt to change the ownership to nobody:nogroup if you just want a "everyone can read/write" share.
 

j79zlr

Glaanies script monkey
Political User
#7
hmm seems like you omitted the smbpasswd line in smb.conf so it doesn't know how to authenticate, did you add

smb passwd file = /etc/smbpasswd

Here's a generic smb.conf that should work:

Code:
[global]
workgroup = your workgroup
server string = pc description
netbios name = machine name
log file = /var/log/log.%m
max log size = 50
security = user
smb passwd file = /etc/smbpasswd
encrypt passwords = yes
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
dns_proxy = no

[sharename]
path = /the/path/to/your/share
public = no
writeable = yes ##only if you want to be able to write to the directory ##
valid users = user1 user2 ##only necessary if you want to restrict users ##
 
#9
here is my SMB.conf

it is an attachment becuase it is kinda large because of 9 hdds and other fedora stuff

======================== Share Definitions ==============================
idmap uid = 16777216-33554431
idmap gid = 16777216-33554431
template shell = /bin/false
password server = None
security = SHARE
encrypt passwords = no
guest ok = yes
guest account = steve
winbind use default domain = no
[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 = /home/netlogon
; guest ok = yes
; writable = 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 = /home/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
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
; read only = yes
; 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
; writable = 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
; writable = 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
; writable = 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 writable 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 = /usr/somewhere/else/public
; public = yes
; only guest = yes
; writable = 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 writable 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
; writable = yes
; printable = no
; create mask = 0765


[storage_1]
comment = Storage 1
path = /storage_1
writeable = yes
guest ok = yes

[storage_2]
path = /storage_2
writeable = yes
comment = storage 2
guest ok = yes

[storage_3]
comment = storage 3
path = /storage_3
writeable = yes
guest ok = yes

[storage_4]
comment = storage 4
path = /storage_4
writeable = yes
guest ok = yes

[storage_5]
comment = storage 5
path = /storage_5
writeable = yes
guest ok = yes

[storage_6]
comment = storage 6
path = /storage_6
writeable = yes
guest ok = yes

[storage_7]
comment = storage 7
path = /storage_7
writeable = yes
guest ok = yes

[storage_8]
comment = storage 8
path = /storage_8
writeable = yes
guest ok = yes

[storage_9]
comment = storage 9
path = /storage_9
writeable = yes
guest ok = yes
 

Glaanieboy

OSNN Veteran Addict
#10
OK, I added the smb passwd line (which I pointed to /usr/local/bin/smbpasswd, since it resides there, there is nothing in /etc), but when adding users, I am getting this error:
Code:
server1# smbpasswd -a glenn
New SMB password:
Retype new SMB password:
unable to open passdb database.
Added user glenn.
But it seems it did add the user, but for some reason it can't find the passdb file. Is this where the Unix passwords are stored? Anyway, this trick didn't work, since Windows is giving the same error.

edit: added the smb.conf file as an attachment.
 

Attachments

Glaanieboy

OSNN Veteran Addict
#12
canadian_divx said:
i can now viwe the share and view teh files in it but i do not have teh rights to write to it.
Try adding 'read only = no' to each network share. That's what I remember from the previous time I installed Samba.
 

j79zlr

Glaanies script monkey
Political User
#13
/usr/local/bin/smbpasswd is the executable not the password file, it should create the smbpasswd file in /etc; I checked and it is there on FreeBSD. You should have both a passwd and smbpasswd in /etc

Code:
joe@daemonode$ ls | grep passwd
master.passwd
master.passwd.bak
passwd
smbpasswd
joe@daemonode$
 

j79zlr

Glaanies script monkey
Political User
#16
smb passwd file = /usr/local/etc/smbpasswd

^ that is what you have listed, but it should be in just plain /etc, atleast it is here on both linux and freebsd
 

Glaanieboy

OSNN Veteran Addict
#17
j79zlr said:
smb passwd file = /usr/local/etc/smbpasswd

^ that is what you have listed, but it should be in just plain /etc, atleast it is here on both linux and freebsd
That's what I forgot to tell, the file I uploaded still points to the faulty location. I already edited it, so that's ok :) Couldn't you find anymore errors?
 

j79zlr

Glaanies script monkey
Political User
#20
Glaanieboy said:
That's what I forgot to tell, the file I uploaded still points to the faulty location. I already edited it, so that's ok :) Couldn't you find anymore errors?
Everything else looked ok
 

Members online

No members online now.

Latest posts

Latest profile posts

Perris Calderon wrote on Electronic Punk's profile.
Ep, glad to see you come back and tidy up...did want to ask a one day favor, I want to enhance my resume , was hoping you could make me administrator for a day, if so, take me right off since I won't be here to do anything, and don't know the slightest about the board, but it would be nice putting "served administrator osnn", if can do, THANKS

Been running around Quora lately, luv it there https://tinyurl.com/ycpxl
Electronic Punk wrote on Perris Calderon's profile.
All good still mate?
Hello, is there anybody in there? Just nod if you can hear me ...
Xie
What a long strange trip it's been. =)

Forum statistics

Threads
61,971
Messages
673,299
Members
89,016
Latest member
Poseeut