[Samba] (again) - problem with users

Glaanieboy

OSNN Veteran Addict
Joined
6 Mar 2002
Messages
2,628
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

  • samba_error.png
    samba_error.png
    13.3 KB · Views: 67
do you want the share to be password protected, or open to anyone?

post your smb.conf file.
 
i am having this same error with a fedora server i am working on. it is set to share to everyone but my windows still wont see it
 
canadian_divx said:
i am having this same error with a fedora server i am working on. it is set to share to everyone but my windows still wont see it
post your smb.conf too :D
 
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.
 
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 ##
 
you can also do testparm -v /etc/samba/smb.conf to see the (default) values that have been set that are not visible in your smb.conf.
 
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
 
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

  • smb.conf.txt
    9.6 KB · Views: 104
i can now viwe the share and view teh files in it but i do not have teh rights to write to it.
 
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.
 
/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$
 
i added the line but still no go. any other ideas?

what about guest account = steve could i replase the name with annonumus (spelling)
 
Changed the value for smb passwd, but still nothing. Can you take a look at my smb.conf file and tell me if anything is wrong?
 
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
 
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?
 
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 profile posts

Also Hi EP and people. I found this place again while looking through a oooollllllldddd backup. I have filled over 10TB and was looking at my collection of antiques. Any bids on the 500Mhz Win 95 fix?
Any of the SP crew still out there?
Xie wrote on Electronic Punk's profile.
Impressed you have kept this alive this long EP! So many sites have come and gone. :(

Just did some crude math and I apparently joined almost 18yrs ago, how is that possible???
hello peeps... is been some time since i last came here.
Electronic Punk wrote on Sazar's profile.
Rest in peace my friend, been trying to find you and finally did in the worst way imaginable.

Forum statistics

Threads
62,015
Messages
673,494
Members
5,621
Latest member
naeemsafi
Back