Configure CIFS server services using SWAT
The following article describe how to configure the CIFS Server Services using the Samba Web Administration Tool, or SWAT for short. The CIFS server is assum to be already installed on the server and basic knowledge of SMB/CIFS interoperation is a must have.
1. Check SWAT services in /etc/services and /etc/inetd.conf configuration files.
# grep swat /etc/services /etc/inetd.conf /etc/services:swat 901/tcp # SAMBA Web-based Admin Tool /etc/inetd.conf:swat stream tcp nowait.400 root /opt/samba/bin/swat swat
2. Login into SWAT interface: http://<servername>:901. When ask for username and password use the corresponding root and root password of the server.
3. Go to Global section and configure following fields:
- workgroup = <DOMAIN/WORKGROUP NAME>
- netbios name = <HOSTNAME>
- server string = CIFS Server
- security = USER
- encrypt passwords = Yes
- case sensitive = Yes
4. Go to STATUS, Start All Services
5. Create a new share under SHARES.
5.1. Choose the new share name.
5.2. Configure the share parameters
- comment = CIFS Test
- path = /var/tmp
- case sensitive = Yes
- browsable = Yes
6. Go to STATUS, Restart All Services. Review the configuration file at "/etc/opt/samba/smb.conf"
# cat smb.conf # Samba config file created using SWAT # from 184.108.40.206 (220.127.116.11) # Date: 2008/07/22 15:01:19 [global] workgroup = AMERICAS server string = CIFS Server log file = /var/opt/samba/log.%m max log size = 1000 local master = No read only = No short preserve case = No dos filetime resolution = Yes [test] comment = CIFS Test Share path = /var/tmp case sensitive = Yes
7. Create a user in HP-UX with the same name as the windows client user. Make sure the user entry in "/etc/passwd" looks like this: "<user>:<password_hash>:<uid>:<gid>::<share_path>:/bin/false"
# grep marinale /etc/passwd test1:*:101:20::/var/tmp:/bin/false
8. To confirm the windows client user name run this command on the console prompt: echo %username%
Microsoft Windows 2000 [Version 5.00.2195] (C) Copyright 1985-2000 Microsoft Corp. C:\Documents and Settings\test1>echo %username% test1 C:\Documents and Settings\test1>
9. Make sure that the UNIX and Windows are the same to ensure correct NTLM authentication.
10. From CIFS server, add the user to samba configuration.
# smbpasswd -a <username>
11. In windows, open Windows Explorer and try to connect to the network share: "\\<servername>\<share>"