Samba setup issues
I have a Linux server running Redhat Enterprise 5.4 I think it is, Linux version 2.6.18-165.9.1.el5. This is not going to be a Samba server all I am trying to do is map to two shares on a Windows server. The issues I am having are related to the Linux configuring and not the windows side. So I assume all I need to do is a samba client setup. I am learning Linux as I go along so please bear with me.
I have done some preliminary checks and maybe I'm doing something wrong or have missed something hopefully someone can help. I have checked to see if the samba packages are installed, rpm -qa | grep samba results system-config-samba-1.2.41-5.el5 samba-client-3.0.33-3.15.el5_4.1 samba-3.0.33-3.15.el5_4.1 I checked the smb daemon and the run levels were all off so I set it to chkconfig --level 2345 smb on When I try to start the smb daemon service smb start the command completes with no response When I check it service sbm status results smbd is stopped nmbd is stopped So the first issue I'm having is smb will not start. (Maybe has something to do with not being able to edit smb.conf?) If I try to go into System-Administation-Server Settings-Samba-Samba Server Configuration (I'm thinking I don't need to do this but I'm trying it anyway) and if I try to configure something I get a "Cannot write to /etc/samba/smb.conf. Program will now exit." error. If I try to vi into smb.conf and edit I get "E212: Can't open file for writing." message and forcing the overwrite doesn't work. The /etc/samba directory is owned by root and the permissions of smb.conf are 644. By the way I do have root access and have SU'd to root. I can't find a swp file that might be locking smb.conf but there is a file in /etc/samba named "smb.conf;4b883068" what it's for I have no idea. There are a few other things I have done to prepare the samba client such setting up the mount point in /mnt, setup the hosts file, created the credentials file but have not done the /ect/fstab setup yet. That's where I'm at hopefully someone can show me what I'm doing wrong or have missed. Thanks in advance. |
did you install samba-common package?
install that package and try to restart smb service. |
No I didn't. I'll see about that and let you know.
|
Samba setup issues
One other thing. I'm a little unsure of which package to install. I found this package, samba-common-3.0.33-3.15.el5_4.1:0.x86_64 on Redhat's website. It appears to be similar version to the other samba packages that are installed. I always notice that the architecture changes on the download page. Like this one says
Arch: AMD64 Available Archs: AMD64 , i386 , ia64 , ppc , ppc64 |
samba-common package available on you redhat media. if you have yum access then you can install from yum repo.
Code:
yum install samba-common you can run uname command to find your platform Code:
uname -a Code:
Linux shailesh 2.6.18-53.el5 #1 SMP Wed Oct 10 16:34:02 EDT 2007 i686 i686 i386 GNU/Linux Code:
Linux shailesh 2.6.5-7.252-smp #1 SMP Tue Feb 14 11:11:04 UTC 2006 x86_64 x86_64 x86_64 GNU/Linux |
Samba setup issues
I went ahead and uninstalled samba and installed samba3x.
So now I have, samba3x-3.3.8-0.51.el5 samba3x-common-3.3.8-0.51.el5 samba3x-winbind-3.3.8-0.51.el5 samba3x-client-3.3.8-0.51.el5 I was abe to install samba3x-common this time. I would receive errors prior when trying to install the previous version samba-common. Anyway, neither smb or winbind still will start. If I run service smb start, smb should be running correct? I now have several smb.conf;xxxxxxxx numbered files now in /etc/samba I cannot do anything to the smb.conf file. And I am logged as root. [username@servername samba]# su - root Password:xxxxx It asks me if I agree to these terms yes or no and I type yes. Which then brings me to, [root@servername samba]# Like I stated earlier I am not able to modify smb.conf. If I try to vi into smb.conf and edit I get "E212: Can't open file for writing." message and forcing the overwrite doesn't work. I cannot do anything to it. Even change the permissions. The /etc/samba directory is owned by root and the permissions of smb.conf are 644. When I vi into smb.conf and as soon as I try to insert something I get, W10: Warning Changing a readonly file I type the text anyway, and when trying to save by typing :wq! I get, "smb.conf" E212: Can't open file for writing Do I need to have system-config-samba installed? There is a system-config-samba-1.2.41-5.el5 file out there but it appears it needs samba and will not work with samba3x. When smbd is stopped that does mean samba is not running correct? When I try to start the smb daemon service smb start the command completes with no response When I check it service sbm status results smbd is stopped What's weird was yesterday I was able to map to a windows share and move files over to it. I'm at a loss here. While it appears to be working but then again several other issues on the linux box show it's not. I'm in a crunch to get this working and working properly, I need to be able to configure that smb.conf file. |
hmm....
Quote:
Quote:
and also give output of below command Code:
# id root Quote:
monitor log file and see is there any error related samba? Code:
# tail -f /var/log/messages |
samba aetup issues
The agree to terms thing is just a message saying that your session is subject to consent to monitoring... blah blah blah ... Do you agree to these terms yes or no. It's required to be there on our systems.
Here's what I got on your other questions. id root uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel),501(createdgroup1) context=root:system_r:unconfined_t:SystemLow-SystemHigh lsattr -d /etc/samba -------------------- /etc/samba lsattr /etc/samba -------------------- /etc/samba/lmhosts.rpmnew -------------------- /etc/samba/dump_cred -------------------- /etc/samba/secrets.tbd -------------------- /etc/samba/smbpasswd_old -------------------- /etc/samba/smb.conf_org -------------------- /etc/samba/fta_cred -------------------- /etc/samba/smbusers -------------------- /etc/samba/smb.conf.rpmnew -------------------- /etc/samba/smb.conf -------------------- /etc/samba/smbpasswd -------------------- /etc/samba/lmhosts -------------------- /etc/samba/passdb.tbd I'll check the logs again. I don't recall any samba related entries. WOuld that be in any special log? |
You dont need to run a samba server if all you want to do is mount a windows driveshare. Most of those packages are related to the server. Am I missing something here? Just mount the windows share:
mount -t cifs //10.0.1.2/sharename -o username=Administrator,password=password /mnt/whatever/ |
Quote:
As i understand OP want to mount shares on windows server ( #1 post) Quote:
|
Right, so why can't he just mount them? The mount command doesn't care what kind of server is offering the drive share.
|
Quote:
|
Maybe I'm misunderstanding. I thought the OP has a windows server offering a drive share, and he wants to mount it in a mount point on his linux box.
mount -t cifs //10.0.1.2/sharename -o username=Administrator,password=password /mnt/whatever/ 10.0.1.2 is the ip of the windows server. Username/password on the windows server are 'Administrator' and 'password'. The windows driveshare is called 'sharename'. Run that mount command, and the windows server driveshare will appear in the linux filesystem at /mnt/whatever. Mounting this share will not cause the linux box to share it with anyone else, unless he runs samba. But he stated in the OP that "This is not going to be a Samba server" - so I assume he doesnt want the linux box to share it. ? |
That would explain why I was able to mount to a Windows share yesterday. I'm a newbie so bear with me. I thought I needed to have samba. So are you saying if I totally uninstalled the samba packages I would still be able to mount to a windows share?
I did do the mount -t cifs //10.0.1.2/sharename -o username=Administrator,password=password /mnt/whatever/ yesterday and it did work. But there is still an issue of why I cannot edit the smb.conf file. There are some requirements that we need to do here and one of them is some configuring of that file. aside from that I also want to use password encryption. Doesn't the smb.conf file need to have that set? I am trying to configure in the smb.conf file security = user encrypt password = yes smb passwd file = /etc/samba/smbpasswd along with creating the smbpasswd file cat /etc/passwd | mksmbpasswd.sh > /etc/samba/smbpasswd If samba is not needed than that's great. But it would be nice to have it working in case I need it later. |
No. smb.conf and anything samba is strictly for the local samba server, it has nothing to do with mounting any drive shares on any other server. So I'm not sure why you think you need to edit it. Yes, you could uninstall ALL of it and the mount command would still work. smbpasswd is the password file for users connecting to your linux box, again, completely irrelevant to what you're doing. I beleive you can make samba use /etc/passwd to authnticate instead of its own smbpasswd file anyway. So if you were gonna run the whole /etc/passwd file thru some script to give all the users samba access, you don't need to do that anyway.
|
samba setup issues
OK so what it looks like is maybe I was doing a lot of unnecessary work. When I mapped to a windows share I thought I had samba working but only partially. I'm sorry but it's still really @&%((!( me off that I can't do anything with smb.conf.
Anyway, the end result I'm trying to reach is the linux box needs to mount to two different shares on a windows server. In order to do that I need to provide from the linux box the windows accounts designated for this purpose in order to authenticate and then access those shares. This will be done via a script and the password needs to be encrypted. I created a credentials file and the script would get the username and password from that. Sure the credential files could be set for root access only but when authenticating to the windows server I don't want the passwords across the network in plain text. |
Passwords do not get passed in clear text.. They did 15+ years ago, but that's been addressed now. I just ran a capture on my linux server mounting an xp share - I can see the user name, share name, client version, etc. But the password is hashed using a challenge / response algorithm. Each time you connect, the password hash is different. Passwords for CIFS mounts can NOT be sniffed off the network.
You MIGHT be able to configure everything to force clear text passwords, but I highly doubt it. |
Quote:
Code:
chown Code:
ls -a |
All times are GMT -5. The time now is 10:10 PM. |