Configuring CIFS server (SAMBA)

sábado, 7 de julho de 2012

The first step is install the CIFS according your HP-UX version. Download the last version from HP site.
Follow the current version:

HP-UX Version
Current feature release
Preceding feature release
11.11
A.02.04.05
A.02.03.06
11.23
A.03.01.05
A.02.04.05
11.31
A.03.01.05
A.02.04.05

1. Edit the configuration files.
# cd /etc/opt/samba
# vi smb.conf


There's much option to configure your CIFS server, bellow is the minumun necessary to configure.
# workgroup = NT-Domain-Name or Workgroup-Name
workgroup = HPUX_SERVER
# server string is the equivalent of the Description field on Windows domain
server string = Samba Server
netbios name = CIFS

# Log file used
log file = /var/opt/samba/log.%m
# Log level?

log level = 1
# Security method
security = user


Bellow is an example to share some directory, in this case we are sharing the "home" dir.
[homes]
comment = Home Directories
path = /home/%U
browseable = yes
writable = yes

2. Check if the smb.conf is ok:
# /opt/samba/bin/testparms
 3. Creating users and machines to connect on domain
If the user exist on box you need just to creat it on samba now.

Creating a user:
# /opt/samba/bin/smbpasswd -a egon
New SMB password:
Retype new SMB password:
Added user egon.


Creating a machine:
# /opt/samba/bin/smbpasswd -am $egonMachine

4. Start / stop samba server
# /opt/samba/bin/startsmb
# /opt/samba/bin/stopsmb


5. Configuring Automatic Start at System Boot
When the HP CIFS Server is first installed, it will not automatically start when the system boots.
You can enable the HP CIFS Server and related daemons to do so by editing the
/etc/rc.config.d/samba file.
RUN_SAMBA=0
RUN_WINBIND=0
To configure HP CIFS Server to start automatically, set RUN_SAMBA to a non-zero value. To configure Winbind to start automatically, set RUN_WINBIND to a non-zero value.