After some time away... here is a new post :-)
and by the way... Happy New Year!!
Requirements:
- User account on Windows box
- Root access on HP-UX box
- cifs patch installed on HP-UX
- Network communication between them (client and server)
- Directory shared on Windows
Check if cifs is running:
# cifsclient status
If it is not running..
# cifsclient start
Create a directory to be used for your mount point and use the bellow command to mount:
# cifsmount //WINDOWSserverHostname/DirectoryShared /YourMountpoint -U username
Check the man pages for more flags to be used with cifsmount command.
How to mount a windows share on HP-UX
Labels: CIFS (samba)
Configuring CIFS server (SAMBA)
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.
Labels: CIFS (samba)
CIFS (Samba) - Quick Reference
/etc/opt/samba/smb.conf
This's the main configuration file.
/var/opt/samba/logs/
Log dir
/etc/rc.config.d/samba
Edit this file seting RUN_SAMBA to a non-zero value to enable the samba start with the server boot
/opt/samba/bin/smbstatus
It shows who is logged and locked files.
/opt/samba/bin/smbstatus -L
Show just he locked files.
/opt/samba/bin/smbstatus -u USERNAME
Show infos about the specified user.
/etc/init.d/smb restart/start/stop
This is the startup script, you can use it to restart, start or stop the samba server.
/opt/samba/bin/smbpasswd -a user
To add a new user
/opt/samba/bin/smbpasswd -ma $computer
To add a new machine in the domain
/opt/samba/bin/smbpasswd -e user
To enable a user
/opt/samba/bin/smbpasswd -x user
To remove a user
/opt/samba/bin/smbpasswd use
Change the password
/opt/samba/bin/testparms
It's used to validate the configuration files
Labels: CIFS (samba), Quick References