Problem
How to get started with samba4 on UnixWare 7 or OpenServer6 Definitive as standalone fileserver
Solution
This procedure describes how to configure samba4 on UnixWare7 or OpenServer6 Definitive 2018 (D2M1/M2) as standalone fileserver
-Make sure Update Pack 1 is installed on the UW7D or OSR6D installation. If not, purchase and install an UP1 license for Definitive and run patchck to install (MP1 and) UP1.
-If you have samba3 installed, you should remove it using the command: # /opt/xinuos/sbin/setup-samba.sh -r The samba3 configuration files are saved to a tar archive.
-Configure samba4:
# /opt/xinuos/sbin/setup-samba.sh
Installing smb.confa) Stand Alone Server d) Active Directory Domain Member
Which one? a Enter Workgroup/Domain name: [MYGROUP] Workgroup name set to "MYGROUP".
Enter Machine name: [scosysv] Machine name set to "scosysv".
Will this system use WINS (recommended)? [Yes]set samba password for root
New SMB password: *****
Retype new SMB password: *****
Added user root.
Make a note of that password, you'll need it
Press return to continue
Installing krb5.conf
Installing user.map
Enable starting Samba daemons at boot time? (recommended) [Yes]Start Samba daemons now? (recommended) [Yes]Make sure /etc/opt/xinuos/samba/smb.conf is configured like you want it.
-The samba has a default 'tmp' share that includes all files in /var/tmp/.Samba. This share can be used for testing.
-Create a file in this samba test directory:
# ls >/var/tmp/.Samba/list.txt-Test samba using /opt/xinuos/bin/smbclient
#smbclient //<hostname or IP>/tmp -U <samba_user>
Enter MYGROUP\root's password: ******
Try "help" to get a list of possible commands.
smb: \> dir
. D 0 Fri Nov 1 16:22:35 2024
.. D 0 Fri Nov 1 16:16:04 2024
list.txt N 319 Fri Nov 1 16:22:35 202440302704 blocks of size 1024. 35615002 blocks availablesmb: \> get list.txt
getting file \list.txt of size 319 as list.txt (24.0 KiloBytes/sec)
(average 24.0 KiloBytes/sec)
smb: \>
smb: \> put list1.txt list2.txt
putting file list1.txt as \list2.txt (-5.8 kb/s) (average 0.0 kb/s)
smb: \> dir
. D 0 Fri Nov 1 16:30:55 2024
.. D 0 Fri Nov 1 16:16:04 2024
list.txt N 319 Fri Nov 1 16:22:35 2024
list2.txt N 319 Fri Nov 1 16:30:55 202440302704 blocks of size 1024. 35614988 blocks available smb: \>quit
-Accessing the 'homes' share:
As a default the 'homes' share is enabled in smb.conf
To access this share the /%H/Samba folder must be created
with the correct access rights.
%H is the homedirectory of a unix user.
# mkdir -p /<unix_user_homedir>/Samba
# chmod -R <username> /<unix_user_homedir>/Samba
# chgrp -R <user_group> /<unix_user_homedir>/Samba
Now the share can accessed using:
# smbclient //<IP_or_servername>/homes -U <user>
On windows this homes share can be accessed by user <user>
as \\<IP_or_servername>\homes.-Add a new samba user and password
Before you can add a samba user, a unix user with the same username
must exist. The samba password may be different from the unix password
# smbpasswd -a <samba_user> #Add samba user and password
# smbpasswd -e <samba_user> #Enable samba userUseful tools while configuring and debugging samba:
-Check syntax and view settings of smb.conf
# testparm -s (Check and view modified settings in smb.conf
# testparm -s -v (check and view modified and default settings)-List all samba users
# pdbedit -L-View connected samba users and active shares on the server. Also displays the smb protocol version used. # smbstatus
-Remove all Xinuos samba4 config files
# /opt/xinuos/sbin/setup-samba.sh -u See also
TA128085, "How to get started with samba4 on UnixWare 7 or OpenServer6 Definitive using windows domain integration"