1820390 Members
3680 Online
109623 Solutions
New Discussion юеВ

Setting up CIFS/Samba

 
Juan Ocasio
Advisor

Setting up CIFS/Samba

Hey gang:

I'm relatively new to the HP/UNIX world. I have just downloaded the latest CIFS files from HP in an attempt to set up a UNIX share for my Windows environment. I have been sifting through some documentation, and have jsut finisted running swlist to verify the download. I am currently backing up my system and will be running the swinstall prog soon. My questionsis this. After I have installed CIFS, what are the next steps in getting my WIN Clients to recognize the UX file system as a network share. It seems as though I would have to mod the smb.conf file, but I'm not too sure what I would need to do.

Assuming my Win Domain was MYDOMAIN, the file system on the UNIX box is /myfilesystem, and I would like to have user1, with a password of 12345 (The account on my windows 2000 network), what would I have to do? If someone could point me to documentation, or even walk me through step by step, that would be appreciated. Also, user1 does not have an account on my HP UX machine. Will this pose a problem?

Thanks in advanced for any assistance!

Juan Ocasio
13 REPLIES 13
RAC_1
Honored Contributor

Re: Setting up CIFS/Samba

Once you install Samba (aka HP 's CIFS), start as follows.

http://server_where_you_installed:901

(this is SWAT tool for configuring thr Samba) There are different things to think about, depending upon how you authenticate the windows user, SAMBA can be set to different security type. If you set the security=server, the users will be authenticated from Windows Primary Domain Controller.

Anil
There is no substitute to HARDWORK
Juan Ocasio
Advisor

Re: Setting up CIFS/Samba

Thanks for the speedy reply. Ok so I just took a look at that (I have samba set up on my test box - it came preinstalled). So I guess I would create a share and the assign users to it. I will look at the documentation for doing this. When I go to run swinstall on my production box, is there anything I should be aware/afraid of? The domentation makes it apoint to backup your entire system(which I am currently doing now).

Thanks again

Juan
RAC_1
Honored Contributor

Re: Setting up CIFS/Samba

Juan,

I confused. At one point you are saying that it came pre-installed. (what came pre-installed??). On your server use swlist, and check if you have CIFS/Samba installed on you machine. If you have, then just start as follows.

http://10.17.24.3:901

The ip_Address is the ip address of the machine, where you installed SAMBA/CIFS. The port 901, should not have been disabled.
I also recommand you to go through following Samba documents to understand how it works, different options etc.

http://www.oreilly.com/catalog/samba/chapter/book/

Anil
There is no substitute to HARDWORK
Juan Ocasio
Advisor

Re: Setting up CIFS/Samba

Anil:

Sorry for the confusion. I have two machines. A production box I'm trying to get CIFS on and a test box that already had CIFS. I found this out this morning as I was looking for the various file systems (/etc/opt/samba,etc.). Although samba is on the test machine it is not configured. So the questions is really for the production box in whci I have to set everything up. This is where I ran swlist this morning from to verify my download from HP. My next step on the production box is to get it completely backed up. I normally run backups on just my sybase dumps and a few file systems, but not on the entire system. This gave me a bit of a concern and that was the reason for my second question about being aware/afraid of any hiccups that could occur during the instalation (using swinstall) of CIFS. When you posted your first question, I tested that against my test box and was able to see the configuration screen for CIFS (as well as the documentation).

Thanks again

Juan

PS Is there any thing I should be aware/afraid of installing this package?
RAC_1
Honored Contributor

Re: Setting up CIFS/Samba

As such there is no need, to check anything. The CIFS product can be fount at http://software.hp.com.

http://software.hp.com/portal/swdepot/displayProductInfo.do?productNumber=B8725AA

But, do prepare the backups of your system. Backup of sybase and ignite recovery archieve for system - just in case.

Once downlaoded, use swinstall to install ind start with SWAT.

Anil
There is no substitute to HARDWORK
Juan Ocasio
Advisor

Re: Setting up CIFS/Samba

OK. I tried to install CIFS and received the following error:

* Beginning Analysis
* Session selections have been saved in the file "/.sw/sessions/swinstall.last".
ERROR: "hostname:/": One or more filesystems that appear in the filesystem table are not mounted and cannot be mounted.
* The analysis phase failed for "hostname:/".
* Analysis had errors.

NOTE: More information may be found in the agent logfile (location is hostname: /var/adm/sw/swagent.log).

======= 10/18/04 11:07:40 EDT END swinstall SESSION (non-interactive)

Is this ok? I can't get the service to start.

Thanks

Juan
RAC_1
Honored Contributor

Re: Setting up CIFS/Samba

swinstall -x mount_all_filesystems=false -s "source_path"

Anil
There is no substitute to HARDWORK
Juan Ocasio
Advisor

Re: Setting up CIFS/Samba

Anil:

Thanks again for the reply. So I need to add this to my entire swinstall command?

after the -s I would put in /tmp/B8725AA_A...?

Thanks

Juan
Juan Ocasio
Advisor

Re: Setting up CIFS/Samba

Anil:

Thanks for your help. I've got Samba installed. I've been reading up on Samba, but can't seem to get it to work. The services are running as daemons and I created a new share. Everytime I try to access this share via windows explorer (by typing in \\xxx.xxx.xxx.xxx\share_name, I get a user logon dialog box. I can't seem to get past this screen. What I would like to do is set up a share where the user logging in does not have a user account in UNIX, but is able to connect to the share and retrieve files. Can anyone point me in the direction I need to go?

Thanks

Juan
Sundar_7
Honored Contributor

Re: Setting up CIFS/Samba

Juan,

You will have to create a username map file.

# vi /etc/opt/samba/smb.conf
..
username map = /etc/opt/samba/smbusers.map
..
#

# vi /etc/opt/samba/smbusers.map
unixusername
#

Makesure the unix username you mention in the file has approritate permissions to the share you are exporting.

# stopsmb
# startsmb

- Sundar

Learn What to do ,How to do and more importantly When to do ?
Juan Ocasio
Advisor

Re: Setting up CIFS/Samba

Thanks for the reply. I made the changes, but I'm still running into the same problems. I am confident it's an issue of configs, but I'm not sure which ones. Given the following info, can someone direct me in the right direction:

Domain Name: HSNHOME
WIN Server: 192.168.101.2
File system to share: /opt/main/test
UNIX Username: juan
Win 2000 Username juanocasio
Win 2000 Password: juan123

I believe these are all of the pieces needed to make this work, but I'm not too sure where to configure the info. If I missed something, please add it to the list and direct me as to how to implement the param.

Again, many thanks for the help so far!

Juan
Norman_21
Honored Contributor

Re: Setting up CIFS/Samba

Juan

I think the guys provided a very good support!!!
However, I am assuming that you run the smb_setup to make the SAMBA server a PDC Server?
You'll need to create the same account on both the UNIX box as well as the Windows NT box.
Windows NT account: juan

Unix account: juan

Then run the smbpasswd -a juan

Click on the share from the Windows and when you get the Logon Window, enter the above values.

Hope this help
"Attitudes are contagious, is yours worth catching"/ My first point was given by SEP on January 31, 2003
Juan Ocasio
Advisor

Re: Setting up CIFS/Samba

Latif:

I couldn't agree with you more. I have received very good advice on how to get Samba up and running. My Samba Server is not the PDC. I have SBS 2000 (which is the only DC). The Samba Server is really a stand alone server that supports one of our applications. In fact, this is the only reason we have the HP UX box. If I add an account juan to this server and run smbpasswd, how will it be affected when I have to change the password for the user (I change it every 45 days). will I have to run smbpasswd everytime it changes for the network?

Thanks

Juan