We help IT Professionals succeed at work.

Linux

66K

Solutions

33K

Contributors

Linux is a UNIX-like open source operating system with hundreds of distinct distributions, including: Fedora, openSUSE, Ubuntu, Debian, Slackware, Gentoo, CentOS, and Arch Linux. Linux is generally associated with web and database servers, but has become popular in many niche industries and applications.

How to create a PGP key in redhat linux? This key pair will use to encrypt and decrypt VCC Images.
0
Hi all i am trying to setup my ubuntu server so i can run my python scripts and when i try to install mysql-client or mysql for python i am getting a error
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-nwk7rejx/mysqlclient/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-10shw23u-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-nwk7rejx/mysqlclient/

i have  tried good old google and all the ones i have found on there to try didnt work any help would be great
0
I have the following in a php file:

<?php
$output = shell_exec(dirname(__FILE__) . '/add_sku_to_get_flat_rate_quotes.sh');
?>

When I call that file from a browser, it is supposed to run this .sh command in another file in same dir:

me@myserver:~/public_html/mywebsite.com/symfony$ app/console myaccount:get_flat_rate_quotes sku 7017

Which is supposed to add that sku to a table. When I run that sh command from an SSH terminal, it works. What am I missing?

My web host confirmed shell_exec will work on my server.
0
On a linux server when I source ping out the interface (using 1.1.1.1 as source port of linux box)
ping -c3 -N 1.1.1.1 2.2.2.2
PING 2.2.2.2 (2.2.2.2): 56 bytes of data
sendto: 5033
sendto: 5033
snedto: 5033

I can ping 1.1.1.1 from 2.2.2.2
I can ping 1.1.1.1 from other interfaces
Question is what the 'sendto: 5033' response indicate?
0
We have 6 Linux servers with support activated on all servers. Out of the 6 servers 2 are test servers.
I bought 4 new servers and installed new version of Linux and I want to deactivate  support license from the 2 test servers and activate in 2 new servers.
How to use the same license and activate support in the new servers? We no longer need the old test servers.
0
I've installed several Linux distributions in virtual machines running under VMWare Workstation v15.5  [Elementary v5.0,  Linux Mint v19.2,  Ubuntu LTS v18.04.4,  and Ubuntu v19.10

NONE of them have sound when they boot up -- they all display the following message during the boot process:

Linux Sound Issue in VMWare
The "FIX" is very simple:   After the OS is running, just go to VM - Settings - Sound Card and click on the "Connected" box and all will be well.

But it'd be nice if this wasn't necessary.   Anyone know how to resolve it?
0
I just installed Centos 7, and I get too much stuff being output when I use set -x. Weird, huh?
$ set -x
++ __vte_prompt_command
+++ sed 's/^ *[0-9]\+ *//'
+++ HISTTIMEFORMAT=
+++ history 1
++ local 'command=set -x'
++ command='set -x'
++ local 'pwd=~'
++ '[' /home/admin/Tst '!=' /home/admin ']'
++ pwd='~/Tst'
+++ __vte_osc7
++++ __vte_urlencode /home/admin/Tst
++++ LC_ALL=C
++++ str=/home/admin/Tst
++++ '[' -n /home/admin/Tst ']'
++++ safe=/home/admin/Tst
++++ printf %s /home/admin/Tst
++++ str=
++++ '[' -n '' ']'
++++ '[' -n '' ']'

Open in new window

Furthermore, if I type any command, such as ls -l, I get the above stuff with some additional stuff which is possibly related to the specific command. To see the results of the command, I have to scroll up. So, please tell me how to get rid of this stuff and just in case this stuff can prove useful someday, how do I turn this stuff back on?

If I use a -x in a bash script or function in .bashrc, the stuff even spills out past the script.
0
I installed Ubuntu v19.10 in a VMWare virtual machine (running Workstation 15.5), and discovered an issue with Firefox in this environment.

If you go to www.cnn.com, and then attempt to play any of their videos, you get a "forever spinning circle" and a message at the upper left part of the video that says "Something went wrong during native playback."   This happens no matter which video I select.

I went to www.yahoo.com to see if their videos would play, and in that case I get a "Video Not Available" message, with a subtext that says "Unfortunately, this video is missing or damaged and cannot be played" -- but in this case there's no "forever spinning circle".

If I go to www.youtube.com and play one of their videos, everything works fine.

Just for grins, I installed Chromium, and all of the videos play perfectly in this browser.

Interestingly, Firefox works fine for all of these in virtual machines I set up for a couple other Linux distros -- Elementary v5.0 and Linux Mint v19.2.

Just for grins, I also installed the latest LTS version of Ubuntu (v18.04.3) … and it has the exact same issue with Firefox.

Any ideas ??
0
Hi linux experts

Have a huge directory in linux, since many users access and creates files/driectories. even thought we instructed the team...sometime files are owned by them.

As an automation process which reads this parent directory, it fails if its owned by others. automation process can only read and write if its owned by uid/gid 1000
So I run a script on a regular basis as a root to set chown (1000:1000) and chmod 775, so my automation never fails.

Is there a smarter way to handle this situation please. Irrespective of logged user or whoever creates it....files/directory should be set to 1000.

May be g+s set on the parent directory, so all child objects are owned by 1000

please advice/suggest
0
I have Darter Pro Linux Laptop running Ubuntu 18.04 LTS (64-bit).  It was shipped with vi editor pre-installed.  In following thread I asked how to install vim.
https://www.experts-exchange.com/questions/29165311/How-to-install-vim-in-Linux-laptop-that-is-pre-installed-with-vi.html
I selected following solution.
>> vim and vi in newer versions are one and the same, run vi --version;

Attached version information shows that I have vim 8.0.  I think lot of features are missing.  There is no multiple file support.  I open many files from
command prompt but only One file opens.
There is no support for python.  See attached     -python3, meaning python3 feature is missing.
Also, it says small version without GUI.  Please see attached version information.
0
Hello, so I've been trying to fiddle with iptables for my web server. Everything is working except for passive ftp and I can't seem to get it right.

Here are my iptables rules:

-A INPUT -i lo -j ACCEPT 
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT 
-A INPUT -p tcp -m tcp --dport 22 -m state --state NEW,ESTABLISHED -j ACCEPT 
-A INPUT -p tcp -m tcp --dport 80 -m state --state NEW,ESTABLISHED -j ACCEPT 
-A INPUT -p tcp -m tcp --dport 443 -m state --state NEW,ESTABLISHED -j ACCEPT 
-A INPUT -p tcp -m tcp --dport 21 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT 
-A INPUT -p tcp -m tcp --dport 20 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT 
-A INPUT -p tcp -m tcp --sport 1024:65535 --dport 1024:65535 -m conntrack --ctstate ESTABLISHED -j ACCEPT 
-A INPUT -j DROP 
COMMIT

Open in new window


I have the line IPTABLES_MODULES="nf_conntrack_ftp" in iptables-config

Anyway, all ftp users aren't able to connect (they are if I disable iptables).
To put it better, they do connect but then they can never reach their root directory and they get an error saying the / directory couldn't be found.

So there must be something wrong in my IPTABLES, but I can't find it for the life of me. I've followed every guide I found and I can't find my mistake.

Can you guys lend a hand?
0
I'm using the code proposted by Sarabande in one of my previous questions Read and Write on Serial Port under Ubuntu and C/C++ and it works very well even if I found out that sometimes the code stucks immediately before the while() loop without throwing any errors, it just get stuck and nothing happens. Then I run again the code and it works fine.

The device connected to the serial port is a digital scale and it works in this way when it receives
READ<CR><LF>

Open in new window

:
01ST,GS, 0.0,kg<CR><LF>
where
01       code to use only for 485 communications
ST             scale status:
            US - measurement not stable
            ST - measurement stable
            OL - overload weight
            UL - underload weight
            TL - scale non balanced
,              ASCII 044
GS Tipo di dato di peso (2 chars)
,              ASCII 044
0.0             weight
,              ASCII 044
kg             measurement unit (2 caratteri)
<CR><LF> end of packet ASCII 013 e ASCII 010

Why the serial read gets stuck sometimes?
Is there any way to detect if the while() loop is not working in order to skip the operation?
Can it be related to the parameters of the serial port?

This is my current code:
char buf[80] = {'\0' }; 
int set_interface_attribs(int fd, int speed)
{
    struct termios tty;

    if (tcgetattr(fd, &tty) < 0) {
        printf("Error from tcgetattr: %s\n", 

Open in new window

0
I need to migrate my wordpress site to reside on the same UBUNTU 18.04 server with SuiteCRM running PHP Version 7.2.19-0; Ubuntu 18.04.2

I have a /var/www/html directory on the target server where the suitecrm folder is located.

I am not sure where I restore my wp-admin, wp-content & wp-includes directories and wp-*.php files.  Do these get copied to this /var/www/html/ folder and update the refs in the wp-config.php file?

The database has been copied into the same MySQL server that the SuiteCRM is stored in.
0
I am facing another strange issue.  I am installing ESXi 6.5 into my Dell m1000e enviroment on M820 blades.  The environment already runs 6.0 fine.  I'm starting from scratch on the hosts rather then upgrade.  The vCenter Appliance is a new deployment as well.

Install of the Dell Customized ISO for Update 3 was fine.  Set management address and VLAN and pings were successful.  But... I can't get to the WebUI from my Windows based PC.  The login page does not display at all.  But the catch is the my ChromeBook CAN access the WebUI fine as well as a Linux system.  I can't add the new host to the new vCenter either.

A few things to note:
1)  I already tried multiple Windows systems, both Win10 and Win7.
2)  I put the ChromeBook, Linux system and one Win7 machine connected via the same exact patch cable eliminating all possible variables in the network path and still can't access from Windows but can from the other two systems.
3) vCenter appliance is on the same subnet as the host.
4)  Already have verified Windows firewall is disabled.
5)  Windows machine can access the web interface of the 6.0 hosts fine, which are the same subnet.
6)  I tried a regular 6.5 ISO, but it didn't have the correct NIC drivers for the M820.


I have a ticket open with VMware as well, but that isn't getting me anywhere yet.
0
Dear EE,

I have Linux DB server with Oracle 11g Release 2 Patch Set 4.

I have configured IPv6 on this server.
After IPv6  SQLPLUS is not starting

Error: Command Not Found.

Thanks
0
Bitbake is a python program. It was downloaded from:  https://github.com/openembedded/bitbake
bitbake 1.40.0 branch was selected for download.

What instantiated class ConfigParameters(object)?  I see that __init__ or constructor was executed but exactly what python code instantiated this class?


object created
filename:  cookerdata.py
class ConfigParameters(object):
    def __init__(self, argv=sys.argv):
        self.options, targets = self.parseCommandLine(argv)
        self.environment = self.parseEnvironment()

Open in new window


filename:  bitbake
if __name__ == "__main__":
    if __version__ != bb.__version__:
        sys.exit("Bitbake core version and program version mismatch!")
    try:
        sys.exit(bitbake_main(BitBakeConfigParameters(sys.argv),
                              cookerdata.CookerConfiguration()))

Open in new window

0
BitBake is a Python Program.  I downloaded BitBake from  https://github.com/openembedded/bitbake.  I selected branch version 1.40.0 and downloaded the zip.  
At least some of the source code is in bitbake-1.40.0/bin  and  bitbake-14.0.0/lib folders.

I can insert print statements to navigate source code.  Is there alternate way to navigate python program such as bitbake?
0
I have Darter Pro Linux Laptop running Ubuntu 18.04 LTS (64-bit).  vi editor is installed but I want to install vim editor.
Attached file show that vi is installed but vim isn't installed.

What is the best way to manage this installation?  Should I remove vi and then install vim?  vi came installed with this new laptop.  Is it even possible to remove it?
Screenshot-from-2019-11-24-21-49-17.png
0
I just installed a new version of server 2019 and have replaced the 2008 server that acted as the RDP server. I can connect to the 2019 server without any problem with the windows 7-10 remote desktop client. What I can't connect with is our terminal server clients that have been built with Linux (puppy) and rdesktop. They worked fine under 2008 but will not do anything (no error message or other info). I can remotely connect to any of the other servers in the building (the rest are all 2008 R2.)

I have added all of the domain users to the people who can connect list.  The restriction for Network Level authentication is turned off.

I haven't' worked with 2019 yet so I'm not coming up with any ideas of what the problem might be.

Can someone point me in the right direction for a solution?

BTW: I will not be able to get back to this until next week because they are shutting down at the end of the day until then for the holiday.

Thanks for the assist with this.

Regards,

Bill
0
I haven't worked in bash for many years. Someone at work had a problem with substituting a string in a file with a string that included a space. Here is what is in the .bashrc file.
alias frf='set -o noglob;_frf'

function _frf
{
    \echo “Replacing $1 with $2 in all $3 files…”
    \grep -li $1 $3 | \xargs -tI@ \sed -i 's/'$1'/'$2'/g' @
    return
}

Open in new window

The files 1.txt and 2.txt are identical with the contents:
this is a string

Open in new window

The following gives no problems:
frf ring rung
frf rung ring
Then diff 1.txt 2.txt shows no differences.

But the following gives an error:
$ frf ring "r\ ing" 1.txt
“Replace ring with r\ ing in all 1.txt files…”
sed -i s/ring/r\ ing/g 1.txt 
sed: -e expression #1, char 9: unterminated `s' command

Open in new window

I have a couple questions about his alias file.
what does this mean: set -o noglob ?
Why are there '\' before the echo and the grep ?
How to modify this alias to enable escaped spaces?

Btw, what is wrong with diff *.txt which gives error "missing operand after '*.txt'" ? Never had problems like this before. diff 1.txt 2.txt is ok.

I also tried this line which was worse:
find . -name "$3" -exec sed -i 's/$1/$2/g' {} \;

Open in new window

0
We got an audit finding that our Solaris (& possibly Linux as well but I haven't
verify) OS account used for Nagios monitoring do not have password expiry.

Q1:
However, when a Solaris account got expired, it'll cause service disruption
(just like root's cron jobs): is there any way around this?

Q2:
Can we set the SHELL for the nagios account to   /bin/false or no shell so
that it's deemed as non-interactive account & don't require password
expiry?   Will Nagios still work with no shell or a false shell??

Q3:
if we change the password of this nagios account periodically, do we
need to change it in nagios (script or settings) somewhere?
0
hi my vm is blur not clear after runnin this comand xrandr -s 1600x1200
ubuntu
0
Hi,
kindly please suggest

I injected below lines in tomcat catalina.policy,

grant codeBase "file:/<path_to_directory>/-" {
permission java.security.AllPermission;
permission java.io.FilePermission "", "read,write,execute";
permission java.util.PropertyPermission "", "read";
permission java.lang.RuntimePermission "getenv.*";
};

Open in new window


But I still get
Error in Full Agent Registration Info Resolver reading environment variable/system property 
java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "getenv.")

Open in new window

0
anaconda not starting in my ubuntu
curl -O https://repo.anaconda.com/archive/Anaconda3-5.2.0-Linux-x86_64.sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  621M  100  621M    0     0   854k      0  0:12:24  0:12:24 --:--:--  991k
python@python-VirtualBox:/tmp$ sha256sum Anaconda3-2019.03-Linux-x86_64.sh
sha256sum: Anaconda3-2019.03-Linux-x86_64.sh: No such file or directory
python@python-VirtualBox:/tmp$ ls
Anaconda3-5.2.0-Linux-x86_64.sh
config-err-80MCXE
ssh-bM5S1pofRzcW
systemd-private-869adb399f9b4bb29d1faede46df776f-apache2.service-WtkZd0
systemd-private-869adb399f9b4bb29d1faede46df776f-bolt.service-Gy1KOQ
systemd-private-869adb399f9b4bb29d1faede46df776f-colord.service-ueDFWp
systemd-private-869adb399f9b4bb29d1faede46df776f-fwupd.service-YzXstt
systemd-private-869adb399f9b4bb29d1faede46df776f-ModemManager.service-dB7it9
systemd-private-869adb399f9b4bb29d1faede46df776f-rtkit-daemon.service-53koIw
systemd-private-869adb399f9b4bb29d1faede46df776f-systemd-resolved.service-lmGjYY
python@python-VirtualBox:/tmp$ bash Anaconda3-2019.03-Linux-x86_64.sh
bash: Anaconda3-2019.03-Linux-x86_64.sh: No such file or directory
python@python-VirtualBox:/tmp$ sudo bash Anaconda3-2019.03-Linux-x86_64.sh
[sudo] password for python:
bash: Anaconda3-2019.03-Linux-x86_64.sh: No such file or directory
python@python-VirtualBox:/tmp$ conda list
conda:
0
hi am having issue checking java home in linux
 java --version
Unrecognized option: --version
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

i have this in my profile
export JAVA_HOME=/usr1/Oracle/jdk1.8.0_221
export PATH=$JAVA_HOME/bin:$PATH
0

Linux

66K

Solutions

33K

Contributors

Linux is a UNIX-like open source operating system with hundreds of distinct distributions, including: Fedora, openSUSE, Ubuntu, Debian, Slackware, Gentoo, CentOS, and Arch Linux. Linux is generally associated with web and database servers, but has become popular in many niche industries and applications.