I'm on AWS and despite being looged in as root, I can't edit /etc/sudoers
adduser houman
usermod -aG sudo houman
When I login as houman and try sudo ls
:
[sudo] password for houman:
Any idea, why this is happening?
I have been doing this in all previous Ubuntu editions without an issue, but something has changed in Ubuntu 20.04.
sudo apt install iptables-persistent
iptables -A INPUT -p tcp -m tcp --dport 443 -j ACCEPT
...
debconf-set-selections <<< "iptables-persistent iptables-persistent/autosave_v4 boolean true"
debconf-set-selections <<< "iptables-persistent iptables-persistent/autosave_v6 boolean true"
dpkg-reconfigure iptables-persistent
Two things I have noticed
/etc/iptables/rules.v4
is empty*filter :INPUT ACCEPT [0:0] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [0:0] COMMIT
Any advise please?
ulogd2.service doesn't seem to work on Ubuntu 19.10.
When I do ls /run/ulog/ulogd.pid
it finds nothing.
I think the file can't be generated.
When I do ls -lt /run
it shows the correct access rights:
drwxr-xr-x 2 ulog ulog 40 Feb 16 17:32 ulog
Feb 16 17:32:28 stag-1 ulogd[7074]: registering plugin `JSON'
Feb 16 17:32:28 stag-1 ulogd[7074]: building new pluginstance stack: 'ct1:NFCT,ip2str1:IP2STR,print1:PRINTFLOW,emunfct1:LOGEMU'
Feb 16 17:32:28 stag-1 ulogd[7074]: can't find requested plugin NFCT
Feb 16 17:32:28 stag-1 ulogd[7074]: building new pluginstance stack: 'ct2:NFCT,ip2str1:IP2STR,jsonnfct1:JSON'
Feb 16 17:32:28 stag-1 ulogd[7074]: can't find requested plugin NFCT
Feb 16 17:32:28 stag-1 ulogd[7074]: not even a single working plugin stack
Feb 16 17:32:28 stag-1 systemd[1]: ulogd2.service: Can't open PID file /run/ulog/ulogd.pid (yet?) after start: No such file or directory
Feb 16 17:32:28 stag-1 systemd[1]: ulogd2.service: Failed with result 'protocol'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The unit ulogd2.service has entered the 'failed' state with result 'protocol'.
Feb 16 17:32:28 stag-1 systemd[1]: Failed to start Netfilter Userspace Logging Daemon.
-- Subject: A start job for unit ulogd2.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit ulogd2.service has finished with a failure.
--
-- The job identifier is 26836 and the job result is failed.
I have installed redis client (without the server) on one of my servers:
sudo apt install redis-tools
I would like to use redis-cli to connect to a central server where redis is installed.
But because I didn't install the server, there is no config file available at this path:
/etc/redis/redis.conf
Is there a way to create the config, so I don't have to use -h
every time?
When I ssh into the server it says:
11 packages can be updated.
11 updates are security updates.
Then I verify that everything is installed:
canonical-livepatch status --verbose
And this is what I get:
client-version: 9.3.0
machine-id: xxx
machine-token: xxx
architecture: x86_64
cpu-model: Intel(R) Xeon(R) CPU E3-1246 v3 @ 3.50GHz
last-check: 2019-05-15T18:08:12Z
boot-time: 2019-05-11T10:06:52Z
uptime: 104h34m56s
status:
- kernel: 4.15.0-48.51-generic
running: true
livepatch:
checkState: checked
patchState: nothing-to-apply
version: ""
fixes: ""
So there is nothing to apply? How about those 11 security updates then?
UPDATE:
As requested this is the list of upgradeable:
apt list --upgradable
intel-microcode/bionic-security,bionic-updates,bionic-updates,bionic-security 3.20190514.0ubuntu0.18.04.2 amd64 [upgradable from: 3.20180807a.0ubuntu0.18.04.1]
libwbclient0/bionic-security,bionic-updates,bionic-updates,bionic-security 2:4.7.6+dfsg~ubuntu-0ubuntu2.10 amd64 [upgradable from: 2:4.7.6+dfsg~ubuntu-0ubuntu2.9]
linux-generic/bionic-security,bionic-updates,bionic-updates,bionic-security 4.15.0.50.52 amd64 [upgradable from: 4.15.0.48.50]
linux-headers-generic/bionic-security,bionic-updates,bionic-updates,bionic-security 4.15.0.50.52 amd64 [upgradable from: 4.15.0.48.50]
linux-image-generic/bionic-security,bionic-updates,bionic-updates,bionic-security 4.15.0.50.52 amd64 [upgradable from: 4.15.0.48.50]
linux-libc-dev/bionic-security,bionic-updates,bionic-updates,bionic-security 4.15.0-50.54 amd64 [upgradable from: 4.15.0-48.51]
python3-distupgrade/bionic-updates,bionic-updates,bionic-updates,bionic-updates 1:18.04.32 all [upgradable from: 1:18.04.31]
ubuntu-release-upgrader-core/bionic-updates,bionic-updates,bionic-updates,bionic-updates 1:18.04.32 all [upgradable from: 1:18.04.31]
I have two ppa
added to my Ubuntu 16.04 installation and would like to freeze the current release that I have thoroughly tested.
add-apt-repository ppa:certbot/certbot
add-apt-repository ppa:freeradius/stable-3.0
Is there any way to freeze the current version, so that future unattended upgrades don't get the latest which may break the production system?
This is how I have setup my unattended upgrades.
sed -r \
-e 's|^//Unattended-Upgrade::MinimalSteps "true";$|Unattended-Upgrade::MinimalSteps "true";|' \
-e 's|^//Unattended-Upgrade::Mail "root";$|Unattended-Upgrade::Mail "root";|' \
-e 's|^//Unattended-Upgrade::Automatic-Reboot "false";$|Unattended-Upgrade::Automatic-Reboot "true";|' \
-e 's|^//Unattended-Upgrade::Remove-Unused-Dependencies "false";|Unattended-Upgrade::Remove-Unused-Dependencies "true";|' \
-e 's|^//Unattended-Upgrade::Automatic-Reboot-Time "02:00";$|Unattended-Upgrade::Automatic-Reboot-Time "03:00";|' \
-i /etc/apt/apt.conf.d/50unattended-upgrades
echo 'APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Download-Upgradeable-Packages "1";
APT::Periodic::AutocleanInterval "7";
APT::Periodic::Unattended-Upgrade "1";
' > /etc/apt/apt.conf.d/10periodic
service unattended-upgrades restart
Ideally, I could test this first on a test system, and when I'm sure that it all works, I could unfreeze the ppa on production to upgrade to the latest and then freeze it again.
Is this possible?
Tried sudo apt-get install postgresql-9.4
but it doesn't find it.
How can I install this version?
On Ubuntu 14.04 I have done this to get the latest postgres:
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get upgrade
Then I installed version 9.4:
sudo apt-get install postgresql-9.4
However it seems I have now three versions:
sudo service postgresql stop
* Stopping PostgreSQL 9.3 database server [ OK ]
* Stopping PostgreSQL 9.4 database server [ OK ]
* Stopping PostgreSQL 9.5 database server [ OK ]
How can I keep only 9.4 and uninstall the other ones? Thanks
UPDATE:
As suggested in comments I have uninstalled 9.3 and 9.5.
But when I do this:
sudo service postgresql status
9.3/main (port 5432): down
9.4/main (port 5434): online
9.5/main (port 5433): down
So far so good, but when I switch to postgres:
sudo su postgres
and do a psql, I get an error:
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
I just followed these instructions http://www.techrepublic.com/blog/ope...on-ubuntu/4343 on a fresh installed Ubuntu 13.04 and it crashed during installation with the following error message:
Code:
Processing triggers for initramfs-tools ...
update-initramfs: Generating /boot/initrd.img-3.8.0-25-generic
cp: cannot stat ‘/module-files.d/libpango1.0-0.modules’: No such file or directory
cp: cannot stat ‘/modules/pango-basic-fc.so’: No such file or directory
E: /usr/share/initramfs-tools/hooks/plymouth failed with return 1.
update-initramfs: failed for /boot/initrd.img-3.8.0-25-generic with 1.
dpkg: error processing initramfs-tools (--configure):
subprocess installed post-installation script returned error exit status 1
Processing triggers for ca-certificates ...
Updating certificates in /etc/ssl/certs... 0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d....
done.
done.
Processing triggers for ureadahead ...
Errors were encountered while processing:
initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)
Any idea what this is?
Many Thanks,
I am trying to connect to a PPTP VPN server. The same config works fine in Windows but fails in Ubuntu 12.10. It must be some configuration issue.
sudo pptpsetup --create MYVPN --server xxx.xxx.xxx.xxx --username username --password password
Everything is setup correctly. But then when I try to actually run the VPN I get this:
$ sudo pppd call MYVPN updetach
Using interface ppp1
Connect: ppp1 <--> /dev/pts/2
LCP: timeout sending Config-Requests
Connection terminated.
Modem hangup
When I do this for more details:
tail -n 30 /var/log/syslog | grep -i ppp
Mar 18 06:33:08 tp pppd[5082]: pppd 2.4.5 started by root, uid 0
Mar 18 06:33:08 tp pppd[5082]: Using interface ppp1
Mar 18 06:33:08 tp pppd[5082]: Connect: ppp1 <--> /dev/pts/2
Mar 18 06:33:08 tp NetworkManager[988]: SCPlugin-Ifupdown: devices added (path: /sys/devices/virtual/net/ppp1, iface: ppp1)
Mar 18 06:33:08 tp NetworkManager[988]: SCPlugin-Ifupdown: device added (path: /sys/devices/virtual/net/ppp1, iface: ppp1): no ifupdown configuration found.
Mar 18 06:33:08 tp NetworkManager[988]: <warn> /sys/devices/virtual/net/ppp1: couldn't determine device driver; ignoring...
Mar 18 06:34:18 tp pppd[5082]: LCP: timeout sending Config-Requests
Mar 18 06:34:18 tp pppd[5082]: Connection terminated.
Mar 18 06:34:18 tp NetworkManager[988]: SCPlugin-Ifupdown: devices removed (path: /sys/devices/virtual/net/ppp1, iface: ppp1)
Mar 18 06:34:18 tp pppd[5082]: Modem hangup
Mar 18 06:34:18 tp pptp[5084]: anon warn[decaps_hdlc:pptp_gre.c:216]: pppd may have shutdown, see pppd log
Mar 18 06:34:18 tp pppd[5082]: Exit.
Why is it not connecting? It works fine from Windows, so it must be something with Ubuntu 12.10 settings...
EDIT:
sudo pppd call MYVPN debug dump logfd 2 updetach
Is there any information about how to utilize this information to see what might have gone wrong?
pppd options in effect:
debug # (from command line)
updetach # (from command line)
logfd 2 # (from command line)
dump # (from command line)
noauth # (from /etc/ppp/peers/MYVPN)
name username # (from /etc/ppp/peers/MYVPN)
remotename MYVPN # (from /etc/ppp/peers/MYVPN)
# (from /etc/ppp/peers/MYVPN)
pty pptp xxx.xxx.xxx.xxx --nolaunchpppd # (from /etc/ppp/peers/MYVPN)
crtscts # (from /etc/ppp/options)
# (from /etc/ppp/options)
asyncmap 0 # (from /etc/ppp/options)
lcp-echo-failure 4 # (from /etc/ppp/options)
lcp-echo-interval 30 # (from /etc/ppp/options)
hide-password # (from /etc/ppp/options)
ipparam MYVPN # (from /etc/ppp/peers/MYVPN)
nobsdcomp # (from /etc/ppp/peers/MYVPN)
nodeflate # (from /etc/ppp/peers/MYVPN)
noipx # (from /etc/ppp/options)
using channel 27
Using interface ppp1
Connect: ppp1 <--> /dev/pts/2
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x4e812c17> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x4e812c17> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x4e812c17> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0x0 <mru 1400> <auth chap MD5> <magic 0x27f847d4> <pcomp> <accomp> <callback CBCP> <mrru 1614> <endpoint [local:f8.7d.55.9e.60.00.42.53.ac.37.23.b6.c9.f4.6d.2f.00.00.00.00]> < 17 04 01 00>]
sent [LCP ConfRej id=0x0 <callback CBCP> <mrru 1614> < 17 04 01 00>]
rcvd [LCP ConfReq id=0x1 <mru 1400> <auth chap MD5> <magic 0x27f847d4> <pcomp> <accomp> <callback CBCP> <mrru 1614> <endpoint [local:f8.7d.55.9e.60.00.42.53.ac.37.23.b6.c9.f4.6d.2f.00.00.00.00]> < 17 04 01 00>]
sent [LCP ConfRej id=0x1 <callback CBCP> <mrru 1614> < 17 04 01 00>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x4e812c17> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x4e812c17> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x4e812c17> <pcomp> <accomp>]
rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x4e812c17> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x4e812c17> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0x4 <mru 1400> <auth chap MD5> <magic 0x27f847d4> <pcomp> <accomp> <callback CBCP> <mrru 1614> <endpoint [local:f8.7d.55.9e.60.00.42.53.ac.37.23.b6.c9.f4.6d.2f.00.00.00.00]> < 17 04 01 00>]
sent [LCP ConfRej id=0x4 <callback CBCP> <mrru 1614> < 17 04 01 00>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x4e812c17> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0x6 <mru 1400> <auth chap MD5> <magic 0x27f847d4> <pcomp> <accomp> <endpoint [local:f8.7d.55.9e.60.00.42.53.ac.37.23.b6.c9.f4.6d.2f.00.00.00.00]>]
sent [LCP ConfAck id=0x6 <mru 1400> <auth chap MD5> <magic 0x27f847d4> <pcomp> <accomp> <endpoint [local:f8.7d.55.9e.60.00.42.53.ac.37.23.b6.c9.f4.6d.2f.00.00.00.00]>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x4e812c17> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x4e812c17> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x4e812c17> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x4e812c17> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0x9 <mru 1400> <auth chap MD5> <magic 0x27f847d4> <pcomp> <accomp> <endpoint [local:f8.7d.55.9e.60.00.42.53.ac.37.23.b6.c9.f4.6d.2f.00.00.00.00]>]
sent [LCP ConfAck id=0x9 <mru 1400> <auth chap MD5> <magic 0x27f847d4> <pcomp> <accomp> <endpoint [local:f8.7d.55.9e.60.00.42.53.ac.37.23.b6.c9.f4.6d.2f.00.00.00.00]>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x4e812c17> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x4e812c17> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x4e812c17> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x4e812c17> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0xc <mru 1400> <auth chap MD5> <magic 0x27f847d4> <pcomp> <accomp> <endpoint [local:f8.7d.55.9e.60.00.42.53.ac.37.23.b6.c9.f4.6d.2f.00.00.00.00]>]
sent [LCP ConfAck id=0xc <mru 1400> <auth chap MD5> <magic 0x27f847d4> <pcomp> <accomp> <endpoint [local:f8.7d.55.9e.60.00.42.53.ac.37.23.b6.c9.f4.6d.2f.00.00.00.00]>]
LCP: timeout sending Config-Requests
Connection terminated.
Modem hangup
Waiting for 1 child processes...
script pptp xxx.xxx.xx.xxx --nolaunchpppd, pid 6815
Script pptp xxx.xxx.xx.xxx --nolaunchpppd finished (pid 6815), status = 0x0
I have messed around with the template1 database, and would like to reset everything as it was.
Hence I have done a sudo apt-get purge postgresql
However the next time I reinstalled it, the databases are still there. Why? Nothing has been reset.
I am new to Ubuntu 12.04 and am trying to install Persian language support for a friend. I have been googleing for an hour and can't find a tutorial to explain this.
I have added additional language support and added Persian.
What is the next step? How can I type in Persian in LibreWriter please?
Many Thanks
I had to uninstall phpmyadmin from the production server and googled for it and used this:
sudo dpkg -P phpmyadmin
Well, this worked fine, but it seems everyone else on Ubuntu is using a purge instead
sudo apt-get purge phpmyadmin
Have I done anything wrong? Any consequences I should be aware of (it is my production server after all) Are all bits of the phpmyadmin really uninstalled through dpkg -P?
I have installed Eclipse 3.7.2 via PPA and subsequently I have clicked on Add New Software and the link to 64Bit Aptana studio 3.
It found the plugin and installed it correctly.
Now when I startup the Eclipse I get this error:
An internal error has occurred.
No more handlesNative code library failed to load. (java.lang.UnsatisfiedLinkError: /home/xxx/.eclipse/org.eclipse.platform_3.7.0_155965261/plugins/com.aptana.swt.webkitbrowser.linux.x86_64_1.0.0.1295409059/os/linux/x86_64/libcefjni.so: libjpeg.so.62: cannot open shared object file: No such file or directory)
Any idea please?
Update:
Seems to be the Java version:
!SESSION 2012-04-30 07:48:06.985 -----------------------------------------------
eclipse.buildId=I20110613-1736
java.version=1.7.0_04
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_GB
Command-line arguments: -os linux -ws gtk -arch x86_64
!ENTRY org.eclipse.osgi 4 0 2012-04-30 07:48:07.951
!MESSAGE Application error
!STACK 1
java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
no swt-gtk-3740 in java.library.path
no swt-gtk in java.library.path
Can't load library: /home/xxx/.swt/lib/linux/x86_64/libswt-gtk-3740.so
Can't load library: /home/xxx/.swt/lib/linux/x86_64/libswt-gtk.so
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:285)
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:194)
at org.eclipse.swt.internal.C.<clinit>(C.java:21)
at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:63)
at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:54)
at org.eclipse.swt.widgets.Display.<clinit>(Display.java:132)
at org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:695)
at org.eclipse.ui.PlatformUI.createDisplay(PlatformUI.java:161)
I am new to Ubuntu and really would like to replace Windows with it. One problem I am now running into is to make the second screen working.
I have an Optiplex 990, which comes with an internal Intel 2000 Graphic Card and an ASUS ATI Radeon HD 6570. Each graphic card is connected to one 24" monitor.
When I start Ubuntu 12.04 from USB stick, the boot menu shows on the Intel monitor. Then the Ubuntu....-loading-logo appears on the second Ati monitor. Then the actual Ubuntu workspace loads on the Intel monitor again and the ATI monitor goes into power save mode.
Doing this I get:
lspci | grep VGA
00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)
01:00.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI Turks [Radeon HD 6570]
Therefore the screen you see here is only the intel driven one. The ATi one is forgotten.
I ended up installing the ATI driver from their website. and went through the steps as described here:
After installing it, I still get the following:
ubuntu@ubuntu:~/Downloads$ fglrxinfo
display: :0 screen: 0
OpenGL vendor string: Tungsten Graphics, Inc
OpenGL renderer string: Mesa DRI Intel(R) Sandybridge Desktop
OpenGL version string: 1.4 (3.0 Mesa 8.0.2)
Which is expected, as my ATI connected screen is disabled.
Taking a glance at /etc/X11/xorg.conf
Section "ServerLayout"
Identifier "aticonfig Layout"
Screen 0 "aticonfig-Screen[0]-0" 0 0
EndSection
Section "Module"
EndSection
Section "Monitor"
Identifier "aticonfig-Monitor[0]-0"
Option "VendorName" "ATI Proprietary Driver"
Option "ModelName" "Generic Autodetecting Monitor"
Option "DPMS" "true"
EndSection
Section "Device"
Identifier "aticonfig-Device[0]-0"
Driver "fglrx"
BusID "PCI:1:0:0"
EndSection
Section "Screen"
Identifier "aticonfig-Screen[0]-0"
Device "aticonfig-Device[0]-0"
Monitor "aticonfig-Monitor[0]-0"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Depth 24
EndSubSection
EndSection
I don't know what else I could do. Is here any pro that could help me solving this issue?
Many Thanks,