Projects
Kolab:16:TestingLinked
pykolab-python3
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 5
View file
pykolab-0.9.0.tar.gz/pykolab/setup/setup_ldap.py
Changed
@@ -56,6 +56,14 @@ ) ldap_group.add_option( + "--domain", + dest = "domain", + action = "store", + default = None, + help = _("Specify the domain (defaults to one level up from fqdn).") + ) + + ldap_group.add_option( "--allow-anonymous", dest = "anonymous", action = "store_true", @@ -248,19 +256,13 @@ # TODO: Verify the user and group exist. - # TODO: This takes the system fqdn, domainname and hostname, rather then - # the desired fqdn, domainname and hostname. - # - # TODO^2: This should be confirmed. - - if conf.fqdn: - _input'fqdn' = conf.fqdn - _input'hostname' = conf.fqdn.split('.')0 - _input'domain' = '.'.join(conf.fqdn.split('.')1:) + _input'fqdn' = conf.fqdn + _input'hostname' = conf.fqdn.split('.')0 + if conf.domain: + _input'domain' = conf.domain else: - _input'fqdn' = fqdn - _input'hostname' = hostname.split('.')0 - _input'domain' = domainname + _input'domain' = '.'.join(conf.fqdn.split('.')1:) + _input'nodotdomain' = _input'domain'.replace('.','_') _input'rootdn' = utils.standard_root_dn(_input'domain')
View file
pykolab-0.9.0.tar.gz/pykolab/setup/setup_mysql.py
Changed
@@ -181,54 +181,35 @@ confirm=True ) - p1 = subprocess.Popen( - - 'echo', - 'UPDATE mysql.user SET Password=PASSWORD(\'%s\') WHERE User=\'root\';' % ( - mysql_root_password - ) - , - stdout=subprocess.PIPE - ) - - p2 = subprocess.Popen('mysql', stdin=p1.stdout) - p1.stdout.close() - p2.communicate() - - p1 = subprocess.Popen( - - 'echo', - "UPDATE mysql.user SET authentication_string=PASSWORD('%s') WHERE User='root';" % ( - mysql_root_password - ) - , - stdout=subprocess.PIPE - ) - - p2 = subprocess.Popen('mysql', stdin=p1.stdout) - p1.stdout.close() - p2.communicate() - - p1 = subprocess.Popen( - - 'echo', - """ - UPDATE mysql.user - SET plugin='mysql_native_password' - WHERE User='root' AND plugin='auth_socket'; - """ - , - stdout=subprocess.PIPE - ) + mysql_commands = + "UPDATE mysql.user SET Password=PASSWORD('%s') WHERE User='root';" % ( + mysql_root_password + ), + "UPDATE mysql.user SET authentication_string=PASSWORD('%s') WHERE User='root';" % ( + mysql_root_password + ), + """ + UPDATE mysql.user + SET plugin='mysql_native_password' + WHERE User='root' AND plugin='auth_socket'; + """, + "SET PASSWORD FOR 'root'@localhost = PASSWORD('%s');" % (mysql_root_password), + "FLUSH PRIVILEGES;" + + + for mysql_command in mysql_commands: + p1 = subprocess.Popen( + + 'echo', + mysql_command + , + stdout=subprocess.PIPE + ) - p2 = subprocess.Popen('mysql', stdin=p1.stdout) - p1.stdout.close() - p2.communicate() + p2 = subprocess.Popen('mysql', stdin=p1.stdout) + p1.stdout.close() + p2.communicate() - p1 = subprocess.Popen('echo', 'FLUSH PRIVILEGES;', stdout=subprocess.PIPE) - p2 = subprocess.Popen('mysql', stdin=p1.stdout) - p1.stdout.close() - p2.communicate() socket_path = None socket_paths =
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.