EzDevInfo.com

sles interview questions

Top sles frequently asked interview questions

Signing RPM on SLES builds

I have been trying to enable signing my SLES build RPMs and I get this error:

04:30:12 + xargs rpm --resign
04:30:12 error: You must set "%_gpg_name" in your macro file
04:30:12 Pass phrase check failed
04:30:13 Build step 'Execute shell' marked build as failure

I checked on RH6/7 slave machines, I have sign-rpm installed. on SLES slaves there is no such rpm. I do not simply want to copy over those rpms as I am not sure if they'd work for SLES. Anybody knows which rpm to use for SLES specific signing needs?


Source: (StackOverflow)

Sles11sp3 sdk iso repository local or online

I need SDK iso for sles 11 sp3, or way to bypass that without mounting, I need some rpms that are included to that dvd, i.e libqt4-devel which need more devel dependencies. Any idea where I can find it for download or way to bypass it ? (official website and novell website doesn't host it anymore.)

Thanks


Source: (StackOverflow)

Advertisements

Silent client registration for Subscription Management Tool (SMT)

In the documentation for the Subscription Management Tool (SMT) for Suse repository management, there are 4 ways to register a client with the SMT server.

One of these is by running the clientSetup4SMT.sh script. The documentation does not explain any way to perform a silent installation using this script, but is there any way to achieve it?


Source: (StackOverflow)

Garbage characters during decryption with memcpy on OpenSUSE 13.2

I have a program that for some time now under SUSE Linux Enterprise Server has worked fine. Recently, it was moved over to an OpenSUSE 13.2 system and a problem was encountered. The program interfaces to a 3rd party and data is received into our program where the data block consists of some header information and AES encrypted data. Using the OpenSSL libcrypto library we successfully interfaced to this system under SLES. However, under OpenSUSE we consistently see the an error where the end of the decrypted data contains garbage. I have identified where the problem happens and have a work around but in looking at the code, I don’t see why there would be a problem.

I have created a test program that simulates the problem. The test program works fine under SUSE Linux Enterprise Server 11 and on a Red Hat 7.2 Enterprise Linux but fails on OpenSUSE 13.2 using different release levels of the OpenSSL libraries. Under SLES and Red Hat, the decrypted data is cleanly returned. Under OpenSUSE, most of the data is decrypted cleanly except for some garbage that appears toward the end of the data block. The returned block of data is correct, then contains some garbage, and then ends correct. The code for my sample program is below but the line causing the problem is a memcpy() where I shift the encrypted data to the front of the data block for processing. The line in my sample program is below:

   // Generates Garbage
   memcpy(encbuf, encbuf+100, enclen);                 

If I move the encrypted data to temporary buffer before moving it to the start of the encbuf, the garbage is not generated.

   // This does not generate garbage
   memcpy(tmpbuf, encbuf+100, enclen);                 
   memcpy(encbuf, tmpbuf, enclen);                 

My sample program takes a defined buffer of clear text, encrypts it using a key and IV and then decrypts it back and displays the result. Condensed code is as follows:

#include <stdio.h>      
#include <stdlib.h>     
#include <string.h>     
#include <unistd.h>     
#include <time.h>       
#include <fcntl.h>      
#include <sys/types.h>  

#include <openssl/evp.h>

#define EVP_DECRYPT   0 
#define EVP_ENCRYPT   1

char clrbuf[100000];
char encbuf[100000];
char tmpbuf[100000];
int clrlen;         
int enclen;         

char enckey[1024];      
unsigned char enciv[16];

main()
{
   int rc;

   // Set clear text to 50 lines of text
   sprintf(clrbuf,                                                   
         "0001this is a test this is a test this is a test this is a test\n" \
         "0002this is a test this is a test this is a test this is a test\n" \
         "0003this is a test this is a test this is a test this is a test\n" \
         // etc etc etc……………….
         "0048this is a test this is a test this is a test this is a test\n" \
         "0049this is a test this is a test this is a test this is a test\n" \
         "0050this is a test this is a test this is a test this is a test\n"  

   sprintf(enckey, "this is the key this is the key ");
   sprintf(enciv, "1234567890123456");

   // Encrypt the data and simulate a 100 byte header by returning encrypted data 100 bytes into the data block
   //
   memcpy(encbuf, "Some header stuff that will need to be removed", 46);
   rc = evp_aes256_cbc(clrbuf, strlen(clrbuf), encbuf+100, &enclen, enckey, enciv, EVP_ENCRYPT);                  

   // Now remove the header by shifting the encrypted data to the start of the data block and decrypt
   // This is where doing the memcpy() as coded in OpenSUSE results in garbage at the end of clrbuf
   // but everything is returned correctly in SLES and Red Hat
   //
   // This work fines on all OSes:
   //         memcpy(tmpbuf, encbuf+100, enclen);                 
   //         memcpy(encbuf, tmpbuf, enclen);                 

   memcpy(encbuf, encbuf+100, enclen);                 
   rc = evp_aes256_cbc(encbuf, enclen, clrbuf, &clrlen, enckey, enciv, EVP_DECRYPT);

   printf("Decrypt: rc=%d  EncLen=%d  ClrLen=%d\n", rc, enclen, clrlen);
   printf("Data:\n\n<\n%s\n>\n\n", clrbuf);                             
}

/****************************************************************************/  

evp_aes256_cbc(char *InBuf, int InLen, char *OutBuf, int OutLen, char *Key, char *IV, int EncryptFlag)              
{                                                                               
   EVP_CIPHER_CTX ctx;                                                          
   int padlen;                                                                  

   EVP_CIPHER_CTX_init(&ctx);                                                   

   if (! EVP_CipherInit_ex(&ctx, EVP_aes_256_cbc(), NULL, Key, IV, EncryptFlag))
      return(0);                                                                

   if (! EVP_CipherUpdate(&ctx, OutBuf, OutLen, InBuf, InLen))
      return(0);                                              

   if (! EVP_CipherFinal_ex(&ctx, OutBuf+(*OutLen), &padlen)) 
      return(0);                                              

   *OutLen = *OutLen + padlen;                                

   EVP_CIPHER_CTX_cleanup(&ctx);                              

   return(1);                                                 
}                                                             

On SLES and Red Hat, final output looks like:

0046this is a test this is a test this is a test this is a test
0047this is a test this is a test this is a test this is a test
0048this is a test this is a test this is a test this is a test
0049this is a test this is a test this is a test this is a test
0050this is a test this is a test this is a test this is a test

On OpenSUSE, final output can look like:

0046this is a test this is a test this is a test this is a test
0047this is a test this is a test this is a test this is a test
0048this is a test this is a tes╧┬S_úReÅ▌
|τZk╠½çP≥ii≡w╙p▓8ª'MêÅt▒g{Y¥ΩEô¬ ⌡n}⌐*╘¿µ2└╠LS4=Qüü├;~╕Ç<╗^¿ßD0┤T.OQΣq#≈
0050this is a test this is a test this is a test this is a test

Any thoughts?

Thanks


Source: (StackOverflow)

undefined reference to `rpmReadPackageInfo'

I am setting up the rpm programming environment(installed rpm-devel package) as mentioned in these links:

Programming an rpm with C

Compiling and linking rpm programs

Programming an rpm with C

When I try to run the sample program from the site I am getting the below errors:

dev-sles12:~/hits/code # gcc -I/usr/include/rpm -o sample_rpm_read sample_rpm_read.c
/tmp/ccJwC6Yw.o: In function `main':
sample_rpm_read.c:(.text+0x7b): undefined reference to `rpmReadPackageInfo'
sample_rpm_read.c:(.text+0xe0): undefined reference to `headerGetEntry'
sample_rpm_read.c:(.text+0xf1): undefined reference to `headerIsEntry'
sample_rpm_read.c:(.text+0x11c): undefined reference to `headerIsEntry'
sample_rpm_read.c:(.text+0x160): undefined reference to `headerDump'
sample_rpm_read.c:(.text+0x171): undefined reference to `rpmFreeSignature'
collect2: error: ld returned 1 exit status

Check the note in documentation :

Starting with RPM 4.2, you should just need to link in the rpm library. The other libraries will get pulled in automatically if needed.

And I am having a 4.11 version of rpm.

Not sure what other package is needed to get this working. I goggled over the net but could not get proper sources.


Source: (StackOverflow)

How can I do the GlusterFS setup with a LB or heartbeat service in SLES 12?

I've installed GlusterFS on Suse 12 with 2 VMs & 2 replica. When one server goes down it doesn't failover to the 2nd IP automatically. Can I do the same with a loadbalancer or heartbeat service? If yes, How? I need HA configured for the GFS.


Source: (StackOverflow)

Plone Unified Installer missing Python

I'm trying to install plone 4.3.4 on a SLES 11 SP3 64bit server via the Unified Installer. I've fullfilled all the dependencies listed in the readme.txt, but when I try to get the installer running with the command sudo ./install.sh --password=******* standalone I get the error message: which: no python2.7 in (/usr/bin:/bin:/usr/sbin:/sbin) Unable to find python2.7 on system exec path.

I find that rather strange as in the description of the unified installer it is said "The new Zope/Plone install will use its own copy of Python, and the Python installed by the Unified Installer will not replace your system's copy of Python. You may optionally use your system (or some other) Python, and the Unified Installer will use it without modifying it or your site libraries." on the Plone-Website.

So - what am I doing wrong???

I've just tried adding the parameter --build-python but had to find out that the libxml2-devel and libxslt-devel libraries that are available for SLES-11-SP-3 are sadly not up-to-date enough 2.7.6 instead of 2.7.8 and 1.1.24 instead of 1.1.26 respectively. So no joy there either. :-(

Is there any way to install the current version of plone on SLES 11 SP3 64bit?

Kate


Source: (StackOverflow)

How to enable SSH on SLES 12?

I am trying to enable ssh connection to suse linux. I have sshd service running:

peeyush@linux-pohb:~/gccgo.work> systemctl status sshd.service
sshd.service - OpenSSH Daemon
   Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled)
   Active: active (running) since Thu 2015-03-19 18:36:05 IST; 3h 50min ago
  Process: 5702 ExecStartPre=/usr/sbin/sshd-gen-keys-start (code=exited, status=0/SUCCESS)
 Main PID: 6035 (sshd)
   CGroup: /system.slice/sshd.service
           └─6035 /usr/sbin/sshd -D

Mar 19 18:36:01 linux-pohb sshd-gen-keys-start[5702]: Checking for missing se...
Mar 19 18:36:05 linux-pohb sshd-gen-keys-start[5702]: ssh-keygen: generating ...
Mar 19 18:36:06 linux-pohb sshd[6035]: Server listening on 0.0.0.0 port 22.
Mar 19 18:36:06 linux-pohb sshd[6035]: Server listening on :: port 22.
Hint: Some lines were ellipsized, use -l to show in full.

It is listening on port 22 fine:

peeyush@linux-pohb:~/gccgo.work> netstat -an | grep :22
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      
tcp        0      0 :::22                   :::*                    LISTEN 

But I am not able to connect to it.

[root@lep8a peeyush]# ssh root@192.168.122.19
ssh: connect to host 192.168.122.19 port 22: Connection timed out

My head is aching with finding solutions on internet. Nothing is working. Could you guys please help me out?


Source: (StackOverflow)

Get systemd's default limits

is there a way to find out the default values of the parameter which are set in the /etc/systemd/system.conf file?

The manual page of systemd-system.conf just says:

When run as system instance systemd reads the configuration file
system.conf, otherwise user.conf. These configuration files contain a
few settings controlling basic manager operations.

The variables are outcommented (in user.conf + system.conf) and the file /etc/security/limits.conf is ignored by systemd.

So, what are the default values? Are they all set to unlimited?


Source: (StackOverflow)

How to create chroot environment in sles 12?

I am trying to create a chroot environment in sles 12. Is there any tool available which can automate the task for me, like we have mock for Fedora? TIA


Source: (StackOverflow)

SLES 12: Setting default group for new users via /etc/login.defs option USERGROUPS_ENAB not working?

I'm setting up a new SLES 12 server and want to set the default group for new users so that this is not named users but rather <username> (p.ex. user foo would be assigned to the group foo).

I found that the option USERGROUPS_ENAB in /etc/login.defs is supposed to do this job, but after I changed it to USERGROUPS_ENAB yes and tried to create a new user via yast, such new user would - according to yast- still be assigned to users.

How can I accomplish the desired behavior via yast? Or do I miss something?

Thanks!


Source: (StackOverflow)

Execute a script on startup of SLES 12 reboot

I need to start Phusion Passenger 5 standalone upon reboot.

There is no /usr/lib/systemd/system/passenger.service provided.

So I'd like to use a simple start up script, but I can only find SLES 11 guides, but /etc/init.d/Skelton does not exist on SLES_12.

How do I get a script to run at boot time on SLES 12?


Source: (StackOverflow)

External Download of SUSE SLES SP3 rpm Packages

My issue is that I have been set loose with an SLES 11 SP3 server to which I must install Subversion. I am running into many issues like not being able to install the Apache httpd server with Yast because yast asks me to insert an installation cd, but I am eons from the physical machine and no one in Server Ops can help me because they are too busy. How can I independently get these needed packages. I have spent about an hour googling for the apache2, apache2-prefork packages that the yast prompt is asking for. Not sure where to get the resources I need.


Source: (StackOverflow)

Chef client for SLES 11 on PowerPC

I'd like to install chef client in a SLES 11 with IBM Power hardware, does anybody knows if there is any way to install chef client for that distribution and hardware type ?

I've been told to use the RHEL packages but I haven't found any for PPC. Thank you!


Source: (StackOverflow)

2 different versions of PHP on SLES11

I am currently working on a SLES11 system with installed apache webserver to host a WordPress website.

To integrate a LDAP authentication Plug-In in WordPress, the CMS needs the php curl module.

I was wondering that the Plug-In told me, that this isn´t available, because I installed it via the default repository from php5. After some investigation, I´ve found out, that the Webserver is configured, to use php-cgi, which is a php 5.5.16. The default php5 from SUSE repo is 5.3.17.

So I checked the modules and saw this:

For php-cgi:

mgr@server:/etc> php-cgi -m
PHP Warning:  PHP Startup: curl: Unable to initialize module
Module compiled with module API=20090626
PHP    compiled with module API=20121212
These options need to match
 in Unknown on line 0
PHP Warning:  PHP Startup: dom: Unable to initialize module
Module compiled with module API=20090626
PHP    compiled with module API=20121212
These options need to match
 in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php5/extensions/pdo.so' - /usr/lib64/php5/extensions/pdo.so: undefined symbol: zval_property_ctor in Unknown on line 0
PHP Warning:  PHP Startup: pdo_sqlite: Unable to initialize module
Module compiled with module API=20090626
PHP    compiled with module API=20121212
These options need to match
 in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php5/extensions/sqlite.so' - /usr/lib64/php5/extensions/sqlite.so: undefined symbol: zval_property_ctor in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php5/extensions/sqlite3.so' - /usr/lib64/php5/extensions/sqlite3.so: undefined symbol: zval_property_ctor in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php5/extensions/xmlreader.so' - /usr/lib64/php5/extensions/xmlreader.so: undefined symbol: zval_property_ctor in Unknown on line 0
PHP Warning:  PHP Startup: xmlrpc: Unable to initialize module
Module compiled with module API=20090626
PHP    compiled with module API=20121212
These options need to match
 in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php5/extensions/xmlwriter.so' - /usr/lib64/php5/extensions/xmlwriter.so: undefined symbol: zval_property_ctor in Unknown on line 0
PHP Warning:  Cannot load module 'pdo_mysql' because required module 'pdo' is not loaded in Unknown on line 0
[PHP Modules]
cgi-fcgi
Core
ctype
date
ereg
filter
gd
hash
iconv
json
ldap
libxml
mbstring
mcrypt
mhash
mysql
mysqli
mysqlnd
openssl
pcre
Reflection
session
SimpleXML
SPL
standard
suhosin
tokenizer
xml
zlib

[Zend Modules]

And for php:

mgr@server:/etc> php -m
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php5/extensions/php_curl.dll' - /usr/lib64/php5/extensions/php_curl.dll: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: ctype: Unable to initialize module
Module compiled with module API=20121212
PHP    compiled with module API=20090626
These options need to match
 in Unknown on line 0
PHP Warning:  PHP Startup: gd: Unable to initialize module
Module compiled with module API=20121212
PHP    compiled with module API=20090626
These options need to match
 in Unknown on line 0
PHP Warning:  PHP Startup: iconv: Unable to initialize module
Module compiled with module API=20121212
PHP    compiled with module API=20090626
These options need to match
 in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php5/extensions/json.so' - /usr/lib64/php5/extensions/json.so: undefined symbol: zend_new_interned_string in Unknown on line 0
PHP Warning:  PHP Startup: ldap: Unable to initialize module
Module compiled with module API=20121212
PHP    compiled with module API=20090626
These options need to match
 in Unknown on line 0
PHP Warning:  PHP Startup: mbstring: Unable to initialize module
Module compiled with module API=20121212
PHP    compiled with module API=20090626
These options need to match
 in Unknown on line 0
PHP Warning:  PHP Startup: mcrypt: Unable to initialize module
Module compiled with module API=20121212
PHP    compiled with module API=20090626
These options need to match
 in Unknown on line 0
PHP Warning:  PHP Startup: mysql: Unable to initialize module
Module compiled with module API=20121212
PHP    compiled with module API=20090626
These options need to match
 in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php5/extensions/mysqli.so' - /usr/lib64/php5/extensions/mysqli.so: undefined symbol: zend_new_interned_string in Unknown on line 0
PHP Warning:  PHP Startup: openssl: Unable to initialize module
Module compiled with module API=20121212
PHP    compiled with module API=20090626
These options need to match
 in Unknown on line 0
PHP Warning:  PHP Startup: pdo_mysql: Unable to initialize module
Module compiled with module API=20121212
PHP    compiled with module API=20090626
These options need to match
 in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php5/extensions/suhosin.so' - /usr/lib64/php5/extensions/suhosin.so: undefined symbol: zend_execute_ex in Unknown on line 0
PHP Warning:  PHP Startup: tokenizer: Unable to initialize module
Module compiled with module API=20121212
PHP    compiled with module API=20090626
These options need to match
 in Unknown on line 0
PHP Warning:  PHP Startup: zlib: Unable to initialize module
Module compiled with module API=20121212
PHP    compiled with module API=20090626
These options need to match
 in Unknown on line 0
[PHP Modules]
Core
curl
date
dom
ereg
filter
hash
libxml
mhash
mysqlnd
pcre
PDO
pdo_sqlite
Reflection
session
SimpleXML
SPL
SQLite
sqlite3
standard
xml
xmlreader
xmlrpc
xmlwriter

[Zend Modules]

So my questions are: 1. How to solve the problems with the not initialized modules? 2. How to change the apache web server to use /usr/bin/php and not the php-cgi from /usr/bin/php-cgi? 3. Or could somebody explain, how to install the modules for php-cgi?

Thank you

Best regards Andy


Source: (StackOverflow)