Samba on RedHat 7.1 and Win XP Pro WOES... SMB.CONF now included... Possibly Fixed :)

her209

No Lifer
Oct 11, 2000
56,336
11
0
Here's the situation:
I want WinXP Pro to connect to RedHat 7.1 running Samba to a user account on the linux box.

The linux box (and WinXP box) is connected to my router-switch which has a DHCP Server running... and since Im still a newbie in Linux, I don't know how to setup the hostname for RH7.1 without screwing up the whole machine. I tried once using 'netccfg' and it gave me all kind of errors. Besides, the only address listed by 'netcfg' was 127.0.0.1. I tried changing it to something other than 'localhost' and it give me some funky errors. The errors go away when I change it back to 'localhost'.

I can see the Linux Box from WinXP (shows up as "Samba Server (Localhost)"...) Networking Neighborhood in the same workgroup but when I double click on it, it gives me a permissions error along with a "duplicate name exists on the network" error... I cant figure out why... I have an account on both machines with the same username and password. Still no luck :(

I even added the user using 'smbadduser username:username' command.... errr....

What am I doing wrong here??? Guide me to the path of wisdom :-D

smb.conf follows

only the parts that were changed from the default are posted:

# workgroup = NT-Domain-Name or Workgroup-Name
workgroup = GUNDAMS

# server string is the equivalent of the NT Description field
server string = Samba Server
:
:
# 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
:
:
[homes]
comment = Home Directories
valid users = %S
create mode = 0664
directory mode = 0775
browseable = no
writable = yes
:
:

anything wrong???

-----------------------mah fix---------------------

I finally figured out how to change the hostname permanently and error free on RH... this in effect, Samba is now finally working properly :D

For those who are curious, I made changes to a couple of files:
/etc/sysconfig/network -- changed HOSTNAME = <desired hostname>
/etc/hosts -- changed 127.0.0.1 <desired hostname>.<desired domain> <desired hostname>

To get Samba to start automatically, I made 2 links in each of the seven /etc/rc.d/rcX.d (X=0-6) directories
$ ln -s ../init.d/smb S35smb
$ ln -s ../init.d/smb K35smb

I also made changes to the /etc/samba/smb.conf
See above for relevant changes

rebooting the system... I can now access the user accnt on the linux box.

hope this saves a lot of headache for others in the future. thanks for all your help!
 

ScottMac

Moderator<br>Networking<br>Elite member
Mar 19, 2001
5,471
2
0
You might have to enable encrypted passwords (something like that) in the samba config file.

Check out the FAQs on samba.org, there's almost certainly an answer out there.


Good Luck

Scott
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Give us your smb.conf file so we can see if you did something wrong in there. They are pretty tough to setup well. :p
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Here is my smb.conf file:

[global]
# netbios aliases = testing
security = SHARE #not the best security
encrypt passwords = Yes #Probably not necessary but you have this.
# update encrypted = Yes
null passwords = Yes #I dont think you want null passwords
lanman auth = No
show add printer wizard = No
preferred master = False
local master = No
domain master = False
enhanced browsing = No
dns proxy = No
default service = share
username = nobody #You dont have this, not sure if its necessay though since you have usernames and passwords corresponding on each host.
valid users = nobody #might want to add your user here.
netbios name = PRETTY #Dont see this but you should probably add it.
server string = Samba %v running on OSX
workgroup = NSOC
wins server =
[share2] #the name of my share, ie homes
read only = No
guest ok = Yes
max connections = 1
wide links = No
follow symlinks = No
path = /usr/local/share #You dont have this, but Im not sure you need it because I dont know what %S does for valid users
comment = stuff
[share1] #second share
comment = test
path = /share #path to the share, kind of important.
read only = No
guest only = Yes
guest ok = Yes
max connections = 2
fstype = FAT
valid users = nobody
writeable = Yes


I added a couple of comments afterwards. Why do you have browsable set to no?
 

her209

No Lifer
Oct 11, 2000
56,336
11
0
browsable=no

it was set to no because i didnt want users to browse into other user directories.
 

ScottMac

Moderator<br>Networking<br>Elite member
Mar 19, 2001
5,471
2
0
When you do an "ifconfig", do you still have a 127.0.0.1 address (in addition to the one you assigned or got through DBCP)?

If not, you may have some additional stuff to do. The 127.0.0.1 is a loopback address, and fairly important to the proper operation of the TCP/IP stack and network communication.

If you don't have it, I think it can be added with the ifconfig command and/or set up in one of the startup files.

I don't know the *nixs well enough to give the command to you off the top of my head, and I don't have access to *nix at work. Perhaps someone else can fill in the blanks.

If you DO still get the loopback address, then I believe you're all set.

Good Luck, Happy Holidays

Scott
 

mcveigh

Diamond Member
Dec 20, 2000
6,457
6
81
i'd make sure there is still a line in /etc/hosts that reads

127.0.0.1 localhost.localdomain localhost

i recall that some things want to look for localhost by default