I am new to Linux and have a Samba question. I have a home network with 5 pc's 1 of which is a Linux server running Redhat 8.0. I want to set the linux server to run Samba. I have it running now i believe because from my xp machine when i browse the network I see the Samba server. The problem im having is when i try to log in I get incorrect password I also tried to use SWAT to set the .conf up but i get denied when i try to connect to http://127.0.0.1:901 I have forwarded port 901 to server thru the router and have totally disabled the linux firewall but still get connection refused. I believe I am close to getting it but desperattey need some advice on finishing. Any help would be appreciated.
What does your router have with this to do? You are trying to connect to http://127.0.0.1:901/ from the linux computer, aren't you? If not, you should really learn some things about IP networking.
Anyway, the reason to why you can't log in from the XP machine seems clear to me. I don't know just how far you've come in the process, but there are two things that need to be done before Windows machines can log in to your Samba server:
1. Set samba to use encrypted passwords (Set "encrypt passwords = yes" in your smb.conf file)
(1a. Reload samba)
2. Add the user name which you wish to use from the Windows machines to your samba password file using the smbpasswd command. (See the option "smbpasswd -a" for adding users instead of changing your own SMB password)
The reason for this is that since Windows wants to send encrypted passwords over the network (which is sensible). I don't know if you know how password checking works. It uses a one-way encryption scheme, which means that it's easy to encrypt the password, but very hard to decrypt it. What is stored in the password databases are the encrypted passwords, and when you wish to authenticate with a program, it encrypts your password and compares that to what's in the database. The problem is that UNIX and SMB use two different encryption schemes (surprise: the UNIX one is better!). So what that means is that if the Windows computer sends the encrypted password to the Samba server, Samba cannot compare it to your UNIX password database. Instead, you must add the password to Samba's password database, encrypted with the SMB algorithm, using the smbpasswd command. Then Samba can authenticate you.
Oh, and about your SWAT problem. Run this command in a shell and post here what it returns:
netstat -ant | grep 901
Thanks for all the info, again i would like to state that i am very new to linux (like a week) and i appreciate the patients you have had with me. With that said I did as you explained in your post and it worked I added the user root with the smbpasswd -a command and am now able to connect to linux box from my windows XP machine and it works well. SWAT is another story all together. I ran the command:
netstat -ant | grep 901 , and this is what i get.
[lagsalot@sv01 lagsalot]$ netstat -ant | grep 901
as you see it just brings me back to the prompt without giving any information, I also tried this as root and get the same thing. I did have some luck with this command tho:
netstat -ant , and this is what I got.
[lagsalot@sv01 lagsalot]$ netstat -ant
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:32768 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:6000 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:10000 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:113 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:8082 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:8118 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:32794 0.0.0.0:* LISTEN
tcp 0 0 192.168.1.102:22 192.168.1.1:4597 ESTABLISHED
tcp 0 0 192.168.1.102:139 192.168.1.100:4720 ESTABLISHED
I do not see port 901 as listening so im assuming thats my problem altho i did add a rule in lokkit to accept incoming tcp connections to port 901 but i still am getting the error that the connection is refused when i try to connect to http://127.0.0.1:901.
Again thanks for all your help
If the port isn't listening at all, it isn't going to help letting it through with lokkit, no. Probably, either you don't have swat or it's disabled. Check in /etc/xinetd.d for a file with a swat-related name, then look in that file and see if you find "disable = yes" on some line.
If you do, remove that line, then run "service xinetd reload" as root, and swat will be up.
If there is no file with such a name, you just don't have swat. Personally I haven't seen it shipped with samba lately, but it might just be me who haven't installed it.