Evolution keeps asking for passwords on Plasma (KDE)

Standard

I don’t like Evolution so much because I’m very used to Thunderbird, but in some places, for a weird and strange reason, the security guys blocks SMTP/POP/IMAP ports and lets work only MAPI protocol. Those offices usually are Windows-only places and when I go as external consultor I face many troubles.

In my job, we use Exchange (and SOGo), and Evolution has a nice integration with Exchange. We only need the EWS/OBA URLs and domain credentials to set up our PIM and mail client. As those are using HTTP protocol, there is virtually no place where I can connect to my Exchange mail server.

On a recent installation I faced an annoting issue with Evolution. It keeped asking for a password when I launched the application, each time I wanted to write/answer an email and each time I wanted to send that email.

At first, I didn’t mind it asked for a password sometimes, but today I’ve configured a second exchange account, and Evolution asked TWICE for all those passwords. So put six passwords in order to send an email is just ridiculous.

The solution for this is quite simple. Evolution don’t use Kwallet password management but GNOME’ seahorse. So, to get Evolution stop asking passwords, we only must do:

sudo pacman -S seahorse

It will install only gnome-keyring and seahorse packages, 10MB in total. And those will be useful as well for other gnome-based applications which doesn’t consider any other password manager than gnome-keyring.

 

Advertisements

‘authentication key already exists’ error when adding a proxmox node to a cluster

Standard

Today I shall not write about Arch linux but about Proxmox VE, since I faced a problem after rebooting one of the cluster’s nodes and see it had lost all network configuration due the horrible and broken Debian’s apt autoremove feature… one is used to pacman and apt needs a major rewrite to avoid those dependency hell which it cannot leave.

Returning to the topic, if you need to add or readd a node to a existing cluster you should do it with this command from the node you want to add:

# pvecm add clustered_node_IP_or_name

Then, the usual behavior if you add the node for the first time, is to copy the keys from the cluster node to the new node, and modify cluster.conf to add an entry for the new node, and the start all related daemons, like cman or rgmanager.

But if you are adding again this node, you probably end with this error:

# pvecm add clustered_node_IP_or_name
authentication key already exists

I’d searched on Internet for this message and many people ended reinstalling the conflicting node, not a good solution at all, so I tried to get a better one.

Obviously, somwhere on the current cluster configuration is the key for that node, and after some time searching for it everywhere on the system, I decided to do some trick, taking the advantage that the key is already on the configuration.

So, the first thing we need to do is to modify cluster.conf manually and add this node, in proxmox, we need to copy /etc/pve/cluster.conf into a file called /etc/pve/cluster.conf.new and edit that copied file

# cp /etc/pve/cluster.conf /etc/pve/cluster.conf.new
# nano /etc/pve/cluster.conf.new

<?xml version=”1.0″?>
<cluster name=”pvecluster” config_version=”5“>

<cman keyfile=”/var/lib/pve-cluster/corosync.authkey”>
</cman>

<clusternodes>
<clusternode name=”pve01″ votes=”1″ nodeid=”1″/>
<clusternode name=”pve02″ votes=”1″ nodeid=”2″/>
<clusternode name=”quormox” votes=”1″ nodeid=”3″/>  
</clusternodes>

</cluster>

We need to increase the config_version value in one, and then we will add the line <clusternode name=”quormox” votes=”1″ nodeid=”3″/>  giving the desired name and ID.

Then, on the proxmox GUI, under the HA tab, we’ll press “Activate” as shown down here

And we will see the changes with the new node.

Now, we need to copy all needed files on the node we want to add. So first we will delete (do a backup first just in case) the folders on that node, but for that, we need to do it in this order, following the red lines commands. In my example, the node I want to add is called quormox and the node with the working configuration is pve01. I also removed all references to quormox on .ssh/known_hosts in all nodes on the cluster.

root@quormox:~# /etc/init.d/pve-cluster stop
Stopping pve cluster filesystem: pve-cluster.
root@quormox:~# umount /etc/pve
umount: /etc/pve: not mounted
root@quormox:~# /etc/init.d/cman stop
Stopping cluster:
Stopping dlm_controld… [  OK  ]
Stopping fenced… [  OK  ]
Stopping cman… [  OK  ]
Unloading kernel modules… [  OK  ]
Unmounting configfs… [  OK  ]
root@quormox:~# rm /etc/cluster/cluster.conf
root@quormox:~# rm -rf /var/lib/pve-cluster/*
root@quormox:~# scp pve01:/etc/cluster/cluster.conf /etc/cluster/
The authenticity of host ‘pve01 (192.168.96.11)’ can’t be established.
ECDSA key fingerprint is 89:02:2e:79:f3:2a:54:30:2d:78:a8:9c:2c:55:03:e5.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added ‘pve01,192.168.96.11’ (ECDSA) to the list of known hosts.
root@pve01’s password:
cluster.conf                                                100%  340     0.3KB/s   00:00
root@quormox:~# mkdir -p /var/lib/pve-cluster
root@quormox:~# scp pve01:/var/lib/pve-cluster/* /var/lib/pve-cluster/
root@pve01’s password:
config.db                                                   100%   64KB  64.0KB/s   00:00
config.db-shm                                               100%   32KB  32.0KB/s   00:00
config.db-wal                                               100% 1028KB   1.0MB/s   00:00
corosync.authkey                                            100%  128     0.1KB/s   00:00
root@quormox:~# /etc/init.d/pve-cluster start
Starting pve cluster filesystem : pve-cluster

After that, a reboot is needed to start all the daemons in the right order. Once rebooted the node is correclty added to the cluster! 😀

 

qtDesigner does not start

Standard

I’m starting to playing with desktop interfaces, I use KDE and I like a lot Qt controls. Furthermore, are multiplatform, so combined with python I can do beautilful programs in a easy way.

So I’d installed Qt4 Designer on my work’s laptop. But when I clicked on the Qt4 Designet icon, nothing happened.

I opened a terminal and run designer-qt in order to see what happened. This is what I saw:

$ designer-qt4
designer-qt4: symbol lookup error: /usr/lib/qt4/plugins/designer/libqscintillaplugin.so: undefined symbol: _ZN13QsciScintillaC1EP7QWidget

Pretty weird, it seems something wrong with scintilla. So after reinstalling qscintilla and see that not solved my issue, I tried to recompile from sources instead of reinstalled

$ yaourt -S qscintilla –build

(please note that there are two hyphen (-) before the buid parameter)

Once finished, designer-qt started smoothly 🙂

sudo command ask for a password even with the NOPASSWD condition

Standard

After a hardware problems with my hard disk, I decided to get rid of it and install arch o a new hard disk.

After setting up the graphical environment, one of the configuration I like for my personal computer, discouraged for servers, is to configure sudo for not to ask for my password in each bash session. As said, it’s not recommended to do this, but I’m too lazy to put my password again and again.

So, as you may already know, in order to say to sudo command do not ask for the user password, it execute as root the visudo command and let the user or the group to execute all commands without password.

If you want to your user (malevolent in my case) to execute all sudo command withou password, you must type this when visudo opens.

malevolent ALL=(ALL) NOPASSWD: ALL

Perhaps your user belongs to the wheel group, so you can give to the entire group those rights, but this is even less recommended.

%wheel ALL=(ALL) NOPASSWD: ALL

In both cases, today I faced a new problem. The system continued asking me for my password. Ignoring those entries.

Looking the visudo documentation, it says:

When multiple entries match for a user, they are applied in order.  Where there are multiple matches, the last match is used (which is not  necessarily the most specific match).

So I look my entries with the following command

$ sudo -l
User malevolent may run the following commands on malevolo:
(ALL) NOPASSWD: ALL
(ALL) ALL

An it seems that the nopasswd entry is ignored by the all entry. So including my user just below the root user inside sudoers, did not make the job. After placing the line

malevolent ALL=(ALL) NOPASSWD: ALL

At the very end of the file, executing the last command now it returns:

$ sudo -l
User malevolent may run the following commands on malevolo:
(ALL) ALL
(ALL) NOPASSWD: ALL

And now my system does not ask for my password.

No sound at -each- boot!

Standard

Something very annoying began to happen on my work laptop. Every time I booted it, it was without sound.

The sound applet did not work, I could adjust the volume, and detected the sound card, but no sound came out of the speakers.

But the curious thing was I surely heard some youtube video before, so it stopped  from work suddenly…

After recheck my system detected de hardware with lspci, and the right modules were loaded with lsmod

# lspci | grep -i audio
00:1b.0 Audio device: Intel Corporation NM10/ICH7 Family High Definition Audio Controller (rev 02)
# lsmod | grep -i intel
snd_hda_intel          31351  6
snd_hda_codec         129274  3 snd_hda_codec_realtek,snd_hda_codec_si3054,snd_hda_intel
snd_pcm                63880  4 snd_hda_codec_si3054,snd_hda_codec,snd_hda_intel
snd_page_alloc          5978  2 snd_pcm,snd_hda_intel
snd                    44598  18 snd_hda_codec_realtek,snd_hda_codec_si3054,snd_hwdep,snd_timer,snd_pcm,snd_hda_codec,snd_hda_intel
intel_agp               8692  1 i915
intel_gtt              10204  3 i915,intel_agp
agpgart                22047  3 drm,intel_agp,intel_gtt

I openned a terminal and execute alsamixer and I saw this:

alsamixer muted device

Those “MM” between the bar and the “100<>100” means that is “Muted”. To toggle between muted and unmuted we must use the “M” key. Then, if you have something playing, it will sound. 🙂

Now we can exit alsamixer by pressing the “Esc” key.

Even if in each reboot, I was again muted, it was very easy open a terminal, unmute the sound card, and done. As that laptop is my job tool, and I did use it mainly to connect to remote servers, to document, or to code some scripts, and rarely to listen music or to watch a video tutorial or something with audio, that worked fine for me… but I admit its annoying.

So, digging a bit deeper, I found alsactl and only by typing

# alsactl store

The configuration will be saved through the reboots 😉