Seite 1 von 1

Noob installation problem

Verfasst: 20 Mär 2015, 19:10
von turboaaa
Hey guys,

I have been trying to get Opsi installed in my lab, but keep running into the same issue. I know I am missing something really basic so thank you for your patience.

I am installing on CentOS 7, running as user with administrator rights, and running all commands with sudo, and these are the commands leading up to the error:

Code: Alles auswählen

yum install epel-release
hostnamectl set-hostname opsi.dmz.mast
/etc/init.d/network restart
yum install xinetd 
touch /etc/yum.repos.d/MariaDB.repo
The following is entered into the file created above

Code: Alles auswählen

# MariaDB 10.0 CentOS repository list - created 2015-03-20 00:45 UTC  
# http://mariadb.org/mariadb/repositories/  
[mariadb]  
name = MariaDB  
baseurl = http://yum.mariadb.org/10.0/centos7-amd64 
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB  
gpgcheck=1 

Code: Alles auswählen

yum install MariaDB-server
service mysql start 
mysql_secure_installation 
service smb start 
service nmb start  
service xinetd start 
chkconfig smb on 
chkconfig nmb on 
chkconfig mysql on 
chkconfig xinetd on  
yum install python-pyasn1  
yum -y install wget  
cd /etc/yum.repos.d 
wget http://download.opensuse.org/repositories/home:uibmz:opsi:opsi40/RHEL_7/home:uibmz:opsi:opsi40.repo 
yum makecache  
yum install p7zip p7zip-plugins cabextract 
yum remove tftp-server 
yum install opsi-depotserver opsi-configed
The error is as follows

Code: Alles auswählen

Running transaction
chown: invalid group: \u2018opsiconfd:pcpatch\u2019
Starting opsi config service..su: warning: cannot change directory to /var/lib/opsi: Permission denied
-bash: /var/lib/opsi/.bash_profile: Permission denied
..........   (failed).
  Installing : perl-Locale-Codes-3.26-2.el7.noarch                                                                                                                                                         117/122 
  Installing : perl-Locale-Maketext-1.23-3.el7.noarch                                                                                                                                                      118/122 
  Installing : redhat-lsb-languages-4.1-24.el7.x86_64                                                                                                                                                      119/122 
  Installing : redhat-lsb-4.1-24.el7.x86_64                                                                                                                                                                120/122 
  -> Adding group  pcpatch
groupadd: GID '992' already exists
  Installing : opsi-depotserver-4.0.5.11-1.2.noarch                                                                                                                                                        121/122 
[5] [Mar 20 13:17:33] Configuring samba (opsi-setup|192)
[5] [Mar 20 13:17:36]    Adding share [opsi_depot] (opsi-setup|232)
[5] [Mar 20 13:17:36]    Adding share [opsi_depot_rw] (opsi-setup|294)
[5] [Mar 20 13:17:36]    Adding share [opsi_images] (opsi-setup|308)
[5] [Mar 20 13:17:36]    Adding share [opsi_config] (opsi-setup|324)
[5] [Mar 20 13:17:36]    Adding share [opsi_workbench] (opsi-setup|335)
[5] [Mar 20 13:17:36] Getting current system config (opsi-setup|123)
[5] [Mar 20 13:17:37] System information: (opsi-setup|176)
[5] [Mar 20 13:17:37]    distributor  : CentOS (opsi-setup|177)
[5] [Mar 20 13:17:37]    distribution : CentOS Linux release 7.0.1406 (Core) (opsi-setup|178)
[5] [Mar 20 13:17:37]    ip address   : 198.105.244.64 (opsi-setup|179)
[5] [Mar 20 13:17:37]    netmask      : 255.255.255.0 (opsi-setup|180)
[5] [Mar 20 13:17:37]    subnet       : 198.105.244.0 (opsi-setup|181)
[5] [Mar 20 13:17:37]    broadcast    : 198.105.244.255 (opsi-setup|182)
[5] [Mar 20 13:17:37]    fqdn         : opsi.dmx.mast (opsi-setup|183)
[5] [Mar 20 13:17:37]    hostname     : opsi (opsi-setup|184)
[5] [Mar 20 13:17:37]    domain       : dmx.mast (opsi-setup|185)
[5] [Mar 20 13:17:37]    win domain   : MYGROUP (opsi-setup|186)
[5] [Mar 20 13:17:37]    Creating backup of /etc/samba/smb.conf (opsi-setup|351)
[5] [Mar 20 13:17:37]    Writing new smb.conf (opsi-setup|354)
[5] [Mar 20 13:17:37]    Reloading samba (opsi-setup|359)
[5] [Mar 20 13:17:37] Configuring dhcpd (opsi-setup|367)
[4] [Mar 20 13:17:37] Can't find an dhcpd.conf. Aborting configuration. (opsi-setup|370)
[2] [Mar 20 13:17:38] Traceback: (Logger.py|767)
[2] [Mar 20 13:17:38]      line 3054 in '<module>' in file '/usr/bin/opsi-setup' (Logger.py|767)
[2] [Mar 20 13:17:38]      line 3002 in 'main' in file '/usr/bin/opsi-setup' (Logger.py|767)
[2] [Mar 20 13:17:38]      line 2661 in 'initializeBackends' in file '/usr/bin/opsi-setup' (Logger.py|767)
[2] [Mar 20 13:17:38]      line 209 in '__init__' in file '/usr/lib/python2.7/site-packages/OPSI/Backend/BackendManager.py' (Logger.py|767)
[2] [Mar 20 13:17:38]      line 314 in '__init__' in file '/usr/lib/python2.7/site-packages/OPSI/Backend/BackendManager.py' (Logger.py|767)
[2] [Mar 20 13:17:38]      line 364 in '__loadBackends' in file '/usr/lib/python2.7/site-packages/OPSI/Backend/BackendManager.py' (Logger.py|767)
[2] [Mar 20 13:17:38]      line 100 in '__init__' in file '/usr/lib/python2.7/site-packages/OPSI/Backend/File.py' (Logger.py|767)
[2] [Mar 20 13:17:38]      ==>>> 'getgrnam(): name not found: pcpatch' (opsi-setup|3058)

ERROR: 'getgrnam(): name not found: pcpatch'

[5] [Mar 20 13:17:42] Setting rights (opsi-setup|548)
[2] [Mar 20 13:17:42] Traceback: (Logger.py|767)
[2] [Mar 20 13:17:42]      line 3054 in '<module>' in file '/usr/bin/opsi-setup' (Logger.py|767)
[2] [Mar 20 13:17:42]      line 2999 in 'main' in file '/usr/bin/opsi-setup' (Logger.py|767)
[2] [Mar 20 13:17:42]      line 556 in 'setRights' in file '/usr/bin/opsi-setup' (Logger.py|767)
[2] [Mar 20 13:17:42]      ==>>> 'getgrnam(): name not found: pcpatch' (opsi-setup|3058)

ERROR: 'getgrnam(): name not found: pcpatch'


Re: Noob installation problem

Verfasst: 20 Mär 2015, 22:01
von SisterOfMercy
Don't forget you have create the user and group pcpatch.

Re: Noob installation problem

Verfasst: 23 Mär 2015, 13:50
von turboaaa
SisterOfMercy hat geschrieben:Don't forget you have create the user and group pcpatch.
Thanks for the quick response. After reading over my post I realized I was having permissions problems when it came to creating the account. I am still new to Linux, so it was my fault for not running this as root.

Until I can get back into my test machine could you answer this for me. Do I need to create the accounts manually, and if so what is the best method, or will the installation do it for me?

Thank you so much for your time!

Re: Noob installation problem

Verfasst: 23 Mär 2015, 19:06
von turboaaa
SisterOfMercy hat geschrieben:Don't forget you have create the user and group pcpatch.
So I created the account and group, however when trying to start the opsiconfd I get

Code: Alles auswählen

[root@localhost ~]# service opsiconfd restart
Stopping opsi config service...   (not running).
Starting opsi config service..su: warning: cannot change directory to /var/lib/opsi: Permission denied
-bash: /var/lib/opsi/.bash_profile: Permission denied
....   (failed).
I am thinking this is a permissions problem with the user\group I created. Any ideas?

Re: Noob installation problem

Verfasst: 24 Mär 2015, 10:05
von n.wenselowski
Hello,
SisterOfMercy hat geschrieben:Don't forget you have create the user and group pcpatch.
This is done automatically during the installation.
I'd suggest removing user and group and then reinstall opsi with root privileges.
Also, if on CentOS, I'd suggest disabling SELinux if your new to Linux.


With kind regards

Niko

Re: Noob installation problem

Verfasst: 25 Mär 2015, 14:27
von SisterOfMercy
n.wenselowski hat geschrieben:
SisterOfMercy hat geschrieben:Don't forget you have create the user and group pcpatch.
This is done automatically during the installation.
Oh, bugger, you are right. That'll teach me to only look in /etc/group and /etc/passwd and not in my installation notes. :(

Re: Noob installation problem

Verfasst: 26 Mär 2015, 13:09
von turboaaa
n.wenselowski hat geschrieben:
Oh, bugger, you are right. That'll teach me to only look in /etc/group and /etc/passwd and not in my installation notes. :(
LOL I have done that before as well.

Disabling SELinux helped with all errors except for the "permission denied" when trying to run opsiconfd. However, I think the problem is that the GID for pcpatch is not 992 but 1002 (or 1001, I can't remember off hand). Going to attempt to change the GID to see if it helps.

Thank you all for your patience, this installation has been a big help in my learning. Most of the information I have found has been wrong or outdated, causing me to learn how this stuff works in order to make it work.

Anyway, if you guys have any more ideas on the GID or permission error I would love to hear them.

Re: Noob installation problem

Verfasst: 26 Mär 2015, 13:23
von wolfbardo
turboaaa hat geschrieben: Disabling SELinux helped with all errors except for the "permission denied" when trying to run opsiconfd.
try

Code: Alles auswählen

opsi-set-rights
and start opsiconfd

regards,
Bardo Wolf