1834339 Members
2111 Online
110066 Solutions
New Discussion

SAMBA server

 
SOLVED
Go to solution
Jason Preble
Occasional Contributor

SAMBA server

I would like to share a filesystem to a single win2K system. Is there any best practices? Does anyone know the syntax and command to make it permanent? Thanks, J
7 REPLIES 7
Michael Schulte zur Sur
Honored Contributor

Re: SAMBA server

Hi,

start explorer, extras, add network drive, use \\machine\sharename, you will be asked for username and password. Click try to connect next time when start and it should work.

greetings,

Michael
Jason Preble
Occasional Contributor

Re: SAMBA server

Actually, I know the windows side of it. I need help creating the share on the HP-UX side. How do I share a filesystem to a specific win2k system using a userid/password?
Alzhy
Honored Contributor

Re: SAMBA server

Use SWAT - the Samba Configuration GUI.
Figure out which Authentication you will want - Domain (NT) or Server/User (UNIX Based)..

You should be able to figure it out using SWAT.
Hakuna Matata.
Michael Schulte zur Sur
Honored Contributor

Re: SAMBA server

Hi,

you would have to insert into smb.conf something like this:

[sharename]
comment = User username on %h
path = /path/to/share
force user = useronunix
force group = grouponunix
read only = No
create mask = 0660

then add the user with smbpasswd, test with smbclient.

greetings,

Michael

Darren Prior
Honored Contributor
Solution

Re: SAMBA server

Hi Jason,

There's a number of answers to that question I'm afraid! To modify the config of the Samba server you can either edit the smb.conf or use SWAT (a web gui, point your browser to http://thehostnameofyourserver:901 )

The first step is to choose the security level. For your application I'd consider using user level security. For this you'll need to have an existing HP-UX user - you could create this user with the same name as your Windows user to make it simple.

You then need to create the smbpasswd file, and add a password for your user. Next edit the config to create a new share, with a path of whatever file system or dir you want to share out. Make sure the valid users and write list is set to your HP-UX user. You should now be able to map to the drive, and will be prompted for the password you set.

If you have CIFS/9000 on your system (HP's Samba based product which is free, and supported by HP) you'll have the O'Reilly Using Samba book available, failing that I believe it is freely available on the web.

There's more than one way to do this in Samba - another way is server level security. You don't need to create the smbpasswd file, but you then have to point the password server parm to your PDC.

regards,

Darren.
Calm down. It's only ones and zeros...
Rory R Hammond
Trusted Contributor

Re: SAMBA server

I perfer to vi smb.conf file. their are examples in smb.conf.default

HP has slightly different locations to worry about
Config files:
/etc/opt/samba (smb.conf codepages)
Bootup start files:
/etc/rc.config.d/samba ("turn on samba" variable for rc process)
/sbin/init.d/samba (execstartsmb/stopsmb)
/sbin/init.d/rc1.d/K100samba (kill link to init.d)
/sbin/init.d/rc2.d/S900samba (start link to init.d)

More important is security.
Unix file perms can control some of the access.
Look carefully at smb.conf.default and determine how you want to really control access, host, guest user etc. create masks

Good luck
rory

Yo
There are a 100 ways to do things and 97 of them are right
Stefan Pendl
Valued Contributor

Re: SAMBA server

Hi Jason,
if you want to restrict a share to be accessed only by one machine use:

[yourShare]
host allow = w2k_box_ip

HTH,
Stefan
Programing is fun.