| Author |
Calling all Samba experts
|
|
| Boulware5 2002-10-04, 10:04 pm |
| This is getting on my nerves. I know that in depth Samba configuration is probably beyond Linux+, but I really want to make this work. Here's my situation: I can FINALLY see my Linux computer in windows (after much fooling around which included shutting off Tiny firewall) and can access my Linux files in Windows. However, I cannot mount any windows shares on my Linux machine. I did everything you are supposed to - create a windows username/pass that's the same as a user on the Linux machine.
I realized I didn't have smfs (samba file system support) enabled in my kernel, so I recompiled my kernel to include that but I still have problems mounting shares. Here's what happens:
To see a listing of windows shares:
$smbclient -L windowsmachine
added interface ip=192.168.1.158 bcast=192.168.1.255 nmask=255.255.255.0
Got a positive name query response from 192.168.1.159(255.255.255.0)
Password:
session setup failed: NT_STATUS_LOGON_FAILURE
And that's what it exactly says. It wont accept my password. And I of course did smbpasswd to the same password as my windows password. And here's what happened when I try to mount a windows share:
$smbmount //windowsmachine/directory /newdirectory
Password:
ERRDOS - ERRnoaccess (Access denied).
So any suggestions? I have enabled encrypted passwords because that's what I read you are supposed to have. | |
| Mr. Linux Guy 2002-10-05, 7:33 am |
| In order to get your box to join the Windows domain, set security = domain. Create a "computer account" for the Linux PC (e.g. MyLinux) on the (WINDOM) domain PDC must pre-exist this command. When the Linux account is created on the domain PDC, you *must* check "Allow pre-Windows 2000 computers to use this account"; if it is not, then you get the "NT_Status_Access_Denied" error. Note where it says "User/Group that can add this computer to a domain = Domain Admins". Then run:
smbpasswd –j domainName.com –r PDCname
For example:
smbpasswd -j beer.com -r WINDOZE
This command should return: the date, followed by:
Change_trust_account_password:
Changed password for domain BEER.COM. Joined domain BEER.COM.
If you get the "NT_Status_Access_Denied" error, delete the Linux account on your Windows 2000 PDC, re-boot both PCs and re-create the account in "Active Directory Users & Computers", making sure to check "Allow pre-Windows 2000 computers to use this account". And yes, M$ thinks your Linux box as a "pre-Windows 2000 computer" for some peculiar reason.
If necessary, delete the PDC WINs computer account entries and re-boot the PDC; the PDC WINs will re-detect what’s really needed, including your Linux box.
If this doesn't work, let me know and post your error messages and config files. | |
| wildscribe 2002-10-05, 12:26 pm |
| I'm still figuring out Samba myself. But I just noticed that DevShed is running a series on installing and configuring Samba - "Dancing with Samba." You can check it out at www.devshed.com
Good Luck!
- Wild | |
| prezbedard 2002-12-10, 3:31 pm |
| Ok Lets see I got a lot of different messages with differnet settings.
First
smbpasswd -j bedardinc.com #my windows domain controller# -r linuxserver #the name I gave the domain account for the linux machine#
fetch_domain_sid: Can't resolve address for Linuxserver
Failed to get domain SID. Unable to join domain Bedardinc.com
I tried a couple of other setting but here is the result in summary.
When I don't set netbios name in swat I recieve the above message.
When I do have the Netbios name set in swat I get this:
Can not join bedardinc.com as the domain controller is not our name is our own. We can not be domain member for a domain and also be domain member
Though in swat wizarrd it is set as server/domain member not domain contoller
One this I do like about the error message is that it uses pronouns.
Also is it really nessary to join the linux machince to the domain just to see the shares on the linux machine from the Windows computers? The linux machine can see the windows shares without a problem
The windows computers can see the linux work group just not the shares.
There must be a simpler way? All I want to do is to be able to use the linux machine as a file server.
I forgot to mention that I also changed the host name of my linux box too from localhost.local domain but recieve the same errors so changed it back. | |
| prezbedard 2002-12-10, 4:29 pm |
| quote: Originally posted by wildscribe
I'm still figuring out Samba myself. But I just noticed that DevShed is running a series on installing and configuring Samba - "Dancing with Samba." You can check it out at www.devshed.com
Good Luck!
- Wild
I'm going to check that out.
Thanks | |
| prezbedard 2002-12-10, 11:47 pm |
| quote: Originally posted by Boulware5
To see a listing of windows shares:
$smbclient -L windowsmachine
added interface ip=192.168.1.158 bcast=192.168.1.255 nmask=255.255.255.0
Got a positive name query response from 192.168.1.159(255.255.255.0)
Password:
session setup failed: NT_STATUS_LOGON_FAILURE
And that's what it exactly says. It wont accept my password. And I of course did smbpasswd to the same password as my windows password. And here's what happened when I try to mount a windows share:
$smbmount //windowsmachine/directory /newdirectory
Password:
ERRDOS - ERRnoaccess (Access denied).
So any suggestions? I have enabled encrypted passwords because that's what I read you are supposed to have.
I just did the same command except I did it to see if I could connect to linux share local on the linux machine
$smbclient //localhost/tmp
added interface ip=192.168.1.105 bcast=192.168.1.255 nmask=255.255.255.0
Got a positive name query response from 192.168.1.105(255.255.255.0)
Password:
session setup failed: NT_STATUS_LOGON_FAILURE
#that is when I typed a password
#this what I recieved when I omitted a password
I recieved this error
To see a listing of windows shares:
$smbclient //localhost/tmp
added interface ip=192.168.1.105 bcast=192.168.1.255 nmask=255.255.255.0
Got a positive name query response from 192.168.1.159(255.255.255.0)
Password:
Anonymous login successful
Domain = [BEDARDINC] OS = [UNIX] SERVER = [Samba 2.2.7]
tree connect failed
NT_Status_bad_Network_name
Now instead of seeing Linuxserver workgroup from the windows machince and not being able to access it. (not available)
I see RHserver computer from within Bedardinc work group and can't access that (not available)
Bedardinc is the domain of of my windows domain controller | |
| Mr. Linux Guy 2002-12-11, 6:47 am |
| quote: Originally posted by prezbedard
Also is it really nessary to join the linux machince to the domain just to see the shares on the linux machine from the Windows computers? The linux machine can see the windows shares without a problem
Sorry, the thread I pointed you to was for a Linux client tp join a Windows domain. What do you have for value of hosts deny/hosts allow in your smb.conf file? | |
| prezbedard 2002-12-11, 9:48 am |
| quote: Originally posted by Mr. Linux Guy
Sorry, the thread I pointed you to was for a Linux client tp join a Windows domain. What do you have for value of hosts deny/hosts allow in your smb.conf file?
I'll eventually do that.
For now i'm just interested in plain old file sharing.
I don't have either in the smb.conf
I've been using swat since the weekend and those values are blank.
What I have read about samba makes it seems easier then it is. They say just add a share and reload the service. | |
| Mr. Linux Guy 2002-12-11, 9:56 am |
| Did you create samba users on the server? It's not enough to create normal UNIX users, you also need to add them to samba's own password file. | |
| prezbedard 2002-12-11, 10:48 am |
| No I didn't.
But Shouldn't I be able to see the linux shares locally?
When I go to the home folder and clear it
then put in
smb:///
I see 2 workgroups
bedardinc (windows) and linuxserver
When I go into the windows workgroup I see all the windows shares
when I go into linuxserver locally on the linux machince I see nothing.
so I can't see the shares locally either.
When I do the same thing on Windowss
Microsoft Windows Network I also see both workgroups but when I click the the Linuxserver workgroup I get the network path not found error
Thanks | |
| Mr. Linux Guy 2002-12-11, 12:24 pm |
| You need to add samba users before you can use it to see any Windows shares. Samba authenticates you based on your samba credentials as well as your Windows network userid. | |
| prezbedard 2002-12-11, 1:43 pm |
| quote: Originally posted by Mr. Linux Guy
You need to add samba users before you can use it to see any Windows shares. Samba authenticates you based on your samba credentials as well as your Windows network userid.
I can see the windows shares from the linux machine. I can't see the linux shares locally on the linux machine.
If I make a linux share that gives all access rights to everybody shouldn't I be able to see it no matter where I access it from?
I'll go and add a new user to Samba and see what the result is.
Thanks | |
| prezbedard 2002-12-13, 11:18 am |
| I added a new user and password into samba with no change in results.
I was thinking do I need to change the host name of the linux machine?
I can see the work group just nothing in it from linux itself. From Windows I see the linux workgroup but can't get into it because of the network path not found error.
I currently have linux with the default
of localhost.localdomain.
Should I change this?
Thanks | |
| Mr. Linux Guy 2002-12-13, 1:04 pm |
| Can you post your smb.conf file here? | |
| prezbedard 2002-12-13, 7:20 pm |
| I've been using swat but I do have a backup. The workgroup below is what I can see from the windows machine but can't access. It shows it on linux but nothing in it.
Thanks
# Samba config file created using SWAT
# from UNKNOWN (127.0.0.1)
# Date: 2002/12/12 13:18:46
# Global parameters
[global]
workgroup = LINUXSERVER
netbios name = RHSERVER
server string = Samba Server
security = DOMAIN
encrypt passwords = Yes
obey pam restrictions = Yes
pam password change = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *New*password* %n\n *Retype*new*password* %n\n *passwd:*all*authentication*to
kens*updated*successfully*
unix password sync = Yes
log file = /var/log/samba/%m.log
max log size = 0
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
dns proxy = No
printing = lprng
[homes]
comment = Home Directories
path = /home
valid users = %S
read only = No
create mask = 0664
directory mask = 0775
[printers]
comment = All Printers
path = /var/spool/samba
printable = Yes
browseable = No
[tmp]
comment = Temporary file space
path = /tmp
read only = No
create mask = 0777
force create mode = 0777
guest ok = Yes
[dad]
comment = Dads files
path = /homes/paul/
# guest account =
read only = No
guest ok = Yes | |
| Mr. Linux Guy 2002-12-15, 6:00 am |
| Hmmm, looks OK to me. One time I had a problem like this and it turned out to be a mangled names problem. Sometimes if you take a look at what files are not showing up, you will sometimes notice that they are files which contain upper case letters or which are otherwise not DOS-compatible (ie, they are not legal DOS filenames for some reason).
The Samba server can be configured either to ignore such files completely, or to present them to the client in "mangled" form. If you are not seeing the files at all, the Samba server has most likely been configured to ignore them. Consult the man page smb.conf(5) for details of how to change this - the parameter you need to set is "mangled names = yes".
Try this and see if it helps. You will also want to increase the size of your log file (you have the max size set to, effectively not allowing alog file). Then try again and take a look at your logs and if you still cannot see anything, we can take a look at the logs and see if that gives us any hints. | |
| prezbedard 2002-12-15, 7:08 am |
| Should I give the linux computer a name other then localhost? The thing is I can see the Linuxserver workgroup from both linux and windows machines. I can't see the linux machine itself on the network. The only way I can access is it is by IP address. For example I have a sample webpage up on the linux machine which is running apache and I can see that page by accesses the IP address of the linux machine.
Thanks. | |
| prezbedard 2002-12-15, 11:48 pm |
| I did increase the samba log file to 2000.
Also how do I change the max log size for the boot log?
Thanks.
Also on samba should I set the hostname of the pc and the netbios same ? | |
|
|
|
|
| Mr. Linux Guy 2002-12-17, 2:04 pm |
| quote: Originally posted by prezbedard
I did increase the samba log file to 2000.
Also how do I change the max log size for the boot log?
Thanks.
Also on samba should I set the hostname of the pc and the netbios same ?
Look in /etc/syslog.conf, /etc/logrotate.conf, /etc/log.d/,
/etc/logrotate.d/, etc.
Yes. |
|
|
|