Τελική ρύθμιση του SAMBA.
Τοποθετούμε το LDAP password του cn=admin,dc=myhost,dc=mydomain,dc=gr στο SAMBA (γράφεται στο αρχείο /var/lib/samba/secrets.tdb).#smbpasswd –w
Setting stored password for cn=admin,dc=myhost,dc=mydomain,dc=gr in secrets.tdb
Password:******
Verify password:******
Γεμίζουμε την βάση δεδομένων του LDAP με τα ou που δηλώσαμε στο smbldap.conf καθώς και τους χρήστες Administrator,guest και root.
#smbldap-populate –a Administrator –b nobody –u 2000 –g 2000
users are created with uid >=2000
groups are created with uid >=2000
#smbldap-populate –a Administrator –b nobody –u 2000 –g 2000
users are created with uid >=2000
groups are created with uid >=2000
Τοποθετούμε το password του root για το SAMBA (ίδιο με του admin στο LDAP) και δημιουργούμε το χρήστη root.
#smbpasswd –a root
Θέτουμε τον κωδικό του Administrator ίδιο με του root και ενεργοποιούμε τον Administartor χρήστη του LDAP.
#smbldap-passwd Administrator
#smbldap-usermod –J Administrator
Ελέγχουμε να δούμε εάν τα βασικά Domain του SAMBA υπάρχουν και στον LDAP εξυπηρετητή:
#net rpc group
password:*****
Domain Admins
Domain Users
Domain Guests
Domain Computers
Users
#smbpasswd –a root
Θέτουμε τον κωδικό του Administrator ίδιο με του root και ενεργοποιούμε τον Administartor χρήστη του LDAP.
#smbldap-passwd Administrator
#smbldap-usermod –J Administrator
Ελέγχουμε να δούμε εάν τα βασικά Domain του SAMBA υπάρχουν και στον LDAP εξυπηρετητή:
#net rpc group
password:*****
Domain Admins
Domain Users
Domain Guests
Domain Computers
Users
#slapcat |grep Group |grep dn
dn: ou=Groups,dc=myhost,dc=mydomain,dc=gr
dn: cn=Domain Admins,ou=Groups,dc=myhost,dc=mydomain,dc=gr
dn: cn=Domain Users,ou=Groups,dc=myhost,dc=mydomain,dc=gr
dn: cn=Domain Guests,ou=Groups,dc=myhost,dc=mydomain,dc=gr
dn: cn=Domain Computers,ou=Groups,dc=myhost,dc=mydomain,dc=gr
dn: cn=Administrators,ou=Groups,dc=myhost,dc=mydomain,dc=gr
dn: cn=Account Operators,ou=Groups,dc=myhost,dc=mydomain,dc=gr
dn: cn=Print Operators,ou=Groups,dc=myhost,dc=mydomain,dc=gr
dn: cn=Backup Operators,ou=Groups,dc=myhost,dc=mydomain,dc=gr
dn: cn=Replicators,ou=Groups,dc=myhost,dc=mydomain,dc=gr
dn: sambaSID=S-1-5-32-545,ou=Groups,dc=myhost,dc=mydomain,dc=gr
Προσδίδουμε τα δικαιώματα του SAMBA DOMAIN στο χρήστη Administrator. Τα δικαιώματα είναι τα εξής:
dn: ou=Groups,dc=myhost,dc=mydomain,dc=gr
dn: cn=Domain Admins,ou=Groups,dc=myhost,dc=mydomain,dc=gr
dn: cn=Domain Users,ou=Groups,dc=myhost,dc=mydomain,dc=gr
dn: cn=Domain Guests,ou=Groups,dc=myhost,dc=mydomain,dc=gr
dn: cn=Domain Computers,ou=Groups,dc=myhost,dc=mydomain,dc=gr
dn: cn=Administrators,ou=Groups,dc=myhost,dc=mydomain,dc=gr
dn: cn=Account Operators,ou=Groups,dc=myhost,dc=mydomain,dc=gr
dn: cn=Print Operators,ou=Groups,dc=myhost,dc=mydomain,dc=gr
dn: cn=Backup Operators,ou=Groups,dc=myhost,dc=mydomain,dc=gr
dn: cn=Replicators,ou=Groups,dc=myhost,dc=mydomain,dc=gr
dn: sambaSID=S-1-5-32-545,ou=Groups,dc=myhost,dc=mydomain,dc=gr
Προσδίδουμε τα δικαιώματα του SAMBA DOMAIN στο χρήστη Administrator. Τα δικαιώματα είναι τα εξής:
#net rpc rights list ( -S servername –U Username%Password )
password:*****
SeMachineAccountPrivilege Add machines to domain
SeTakeOwnershipPrivilege Take ownership of files or other objects
SeBackupPrivilege Back up files and directories
SeRestorePrivilege Restore files and directories
SeRemoteShutdownPrivilege Force shutdown from a remote system
SePrintOperatorPrivilege Manage printers
SeAddUsersPrivilege Add users and groups to the domain
SeDiskOperatorPrivilege Manage disk shares
και δίνω στο χρήστη Administrator του LDAP πλήρη δικαιώματα στο SAMBA DOMAIN:
password:*****
SeMachineAccountPrivilege Add machines to domain
SeTakeOwnershipPrivilege Take ownership of files or other objects
SeBackupPrivilege Back up files and directories
SeRestorePrivilege Restore files and directories
SeRemoteShutdownPrivilege Force shutdown from a remote system
SePrintOperatorPrivilege Manage printers
SeAddUsersPrivilege Add users and groups to the domain
SeDiskOperatorPrivilege Manage disk shares
και δίνω στο χρήστη Administrator του LDAP πλήρη δικαιώματα στο SAMBA DOMAIN:
#net –S PDC –U root%Password rpc rights grant “DOMAIN\Domain Admins” SeMachineAccountPrivilege SeTakeOwnershipPrivilege SeRemoteShutdownPrivilege SePrintOperatorPrivilege SeAddUsersPrivilege SeDiskOperatorPrivilege
επιβεβαιώνω ότι όλα έγιναν σωστά:
επιβεβαιώνω ότι όλα έγιναν σωστά:
#net rpc rights list accounts
password:*******
BUILTIN\Print Operators
No privileges assigned
BUILTIN\Account Operators
No privileges assigned
BUILTIN\Backup Operators
No privileges assigned
BUILTIN\Server Operators
No privileges assigned
LDAP\Domain Admins
SeMachineAccountPrivilege
SeTakeOwnershipPrivilege
SeBackupPrivilege
SeRestorePrivilege
SeRemoteShutdownPrivilege
SePrintOperatorPrivilege
SeAddUsersPrivilege
SeDiskOperatorPrivilege
BUILTIN\Administrators
SeMachineAccountPrivilege
SeTakeOwnershipPrivilege
SeBackupPrivilege
SeRestorePrivilege
SeRemoteShutdownPrivilege
SePrintOperatorPrivilege
SeAddUsersPrivilege
SeDiskOperatorPrivilege
Everyone
No privileges assigned
και πλέον ο Administrator μπορεί να συνδεθεί στο domain ως εξης:
#sudo apt-get install smbclient
#smbclient –L LDAP –U Administrator
password:*****
Domain=[LDAP] OS=[Unix] Server=[Samba 3.0.24]
Sharename Type Comment
--------- ---- -------
IPC$ IPC IPC Service (Main LDAP Server)
C$ Disk
Administrator Disk Home Directories
Domain=[LDAP] OS=[Unix] Server=[Samba 3.0.24]
Server Comment
--------- -------
LDAP Main LDAP Server
Workgroup Master
--------- -------
LDAP LDAP
password:*******
BUILTIN\Print Operators
No privileges assigned
BUILTIN\Account Operators
No privileges assigned
BUILTIN\Backup Operators
No privileges assigned
BUILTIN\Server Operators
No privileges assigned
LDAP\Domain Admins
SeMachineAccountPrivilege
SeTakeOwnershipPrivilege
SeBackupPrivilege
SeRestorePrivilege
SeRemoteShutdownPrivilege
SePrintOperatorPrivilege
SeAddUsersPrivilege
SeDiskOperatorPrivilege
BUILTIN\Administrators
SeMachineAccountPrivilege
SeTakeOwnershipPrivilege
SeBackupPrivilege
SeRestorePrivilege
SeRemoteShutdownPrivilege
SePrintOperatorPrivilege
SeAddUsersPrivilege
SeDiskOperatorPrivilege
Everyone
No privileges assigned
και πλέον ο Administrator μπορεί να συνδεθεί στο domain ως εξης:
#sudo apt-get install smbclient
#smbclient –L LDAP –U Administrator
password:*****
Domain=[LDAP] OS=[Unix] Server=[Samba 3.0.24]
Sharename Type Comment
--------- ---- -------
IPC$ IPC IPC Service (Main LDAP Server)
C$ Disk
Administrator Disk Home Directories
Domain=[LDAP] OS=[Unix] Server=[Samba 3.0.24]
Server Comment
--------- -------
LDAP Main LDAP Server
Workgroup Master
--------- -------
LDAP LDAP
| Σχόλια |
|
|
||||||||
|
||||||||
| < Προηγούμενο | Επόμενο > |
|---|















link:http://www.hx31.com link:http://www.welovers.net link:http:...
Some of the link:http://www.newecyclingjersey.net/ available are f...
Δεν είναι ολοκληρωμένο το παράδειγμ...
nice