Chapter 11. Cloning open source virtual servers 193
2. Add the sambauser1 user to the smbpasswd file by using the smbpasswd -a command:
# smbpasswd -a sambauser1
New SMB password: lnx4vm
Retype new SMB password: lnx4vm
startsmbfilepwent_internal: file /etc/samba/smbpasswd did not exist. File
successfully created.
account_policy_get: tdb_fetch_uint32 failed for field 1 (min passwd length),
returning 0
...
Added user sambauser1.
This method of maintaining Samba users, groups, and passwords is good for a small number
of users. For a larger number of users, merging Samba and LDAP is recommended. It is not a
simple as pointing the virtual file and print server at the virtual LDAP server, as described in
11.2, “Creating a virtual LDAP server” on page 185, because the Samba schema must first
be added to LDAP. The details of this process are outside the scope of this book.
11.3.5 Starting Samba at boot time
Samba can be started for the current session by using the service command and at boot
time by using the chkconfig command. Do this for both the smb and nmb services:
# service smb start
Starting SMB services: [ OK ]
# service nmb start
Starting NMB services: [ OK ]
# chkconfig smb on
# chkconfig nmb on
Samba should now be running and configured to start at boot time.
11.3.6 Testing your changes
You can verify that Samba is running by using the following service command:
# service smb status
smbd (pid 6987 6982) is running...
You can verify that the shares that are available by using the following smbclient command:
# smbclient -U sambauser1 -L localhost
Domain=[MYGROUP] OS=[Unix] Server=[Samba 3.5.4-68.el6]
Sharename Type Comment
--------- ---- -------
sharedoc Disk RHEL 6 on System z documentation
IPC$ IPC IPC Service (Samba Server Version 3.5.4-68.el6)
sambauser1 Disk Home Directories
Domain=[MYGROUP] OS=[Unix] Server=[Samba 3.5.4-68.el6]
Server Comment
--------- -------
GPOK226 Samba Server Version 3.5.4-68.el6
Workgroup Master
Commenti su questo manuale