Installed KDE from repositories problems with KDE su

You have a problem with Salix? Post here and we'll do what we can to help.
jallen
Posts: 4
Joined: 5. Dec 2016, 01:07

Installed KDE from repositories problems with KDE su

Post by jallen »

I’ve installed Salix 14.2 XFCE, after which I installed KDE desktop from the repositories. This went without errors, but I now find that those actions which require administrative level privileges don’t work with regard to KDE components which require su.

For example if I go to KDE application launcher and type in the search bar “system clock” then click on the system clock icon, I am immediately asked to type in my administrator password (which in XFCE was created via the single password system of “sudo”), but apparently in KDE I am partly viewed as a user and my sudo password is not recognized by KDE-su applications. But if I use the terminal and type sudo su – places me as administrator at root.

Is there any simple way to rectify this so that KDE-su will recognize my sudo password as kde-su?

I hope the question is understandable, since I see KDE is no longer in use on Salix, but all of the components for its installation exist in the repository—as well as Mate 1.16 (which I also installed without a hitch.)
djemos
Salix Warrior
Posts: 1433
Joined: 29. Dec 2009, 13:45
Location: Greece

Re: Installed KDE from repositories problems with KDE su

Post by djemos »

Create a file kdesurc in ~/.kde/share/config

Code: Select all

echo [super-user-command] > ~/.kde/share/config/kdesurc
echo super-user-command=sudo >> ~/.kde/share/config/kdesurc
Log out and log in kde desktop.
jallen
Posts: 4
Joined: 5. Dec 2016, 01:07

Re: Installed KDE from repositories problems with KDE su

Post by jallen »

Thanks for the suggestion and the quick response, but it didn’t work. I think I’m going to have to reinstall.

I installed Salix from the live-USB and screwed up the install because my home directory is filled with a duplication of root directories – perhaps this is why KDE doesn’t recognize my sudo password. This duplication of the root folders in home is sym-linked to various folders in /. I discovered this when looking for kdm, since I thouht that genkdmconf might not have been configured correctly or even broken. Reinstall is the only real option, hopefully KDE will work then.

Again thanks for the quick response—it is because of your suggestion that I actually started checking out my setup—I went to /usr/share/config/kdm looking for genkdmconf and suddenly I was in something called 30 GiB Hard Drive/ and a whole bunch of directories and I knew something was really fishy in Denmark.

Good first impressions of Salix in spite of my stupidity–should have been more careful since I wasn’t used to the live-usb install format. Will use the normal method this time round.
djemos
Salix Warrior
Posts: 1433
Joined: 29. Dec 2009, 13:45
Location: Greece

Re: Installed KDE from repositories problems with KDE su

Post by djemos »

After installation create the kdesurc file to be able to use sudo with kde.
User avatar
aleXimon
Posts: 11
Joined: 3. Sep 2013, 01:53
Location: Rosario, Argentina

Re: Installed KDE from repositories problems with KDE su

Post by aleXimon »

jallen wrote: I installed Salix from the live-USB and screwed up the install because my home directory is filled with a duplication of root directories – perhaps this is why KDE doesn’t recognize my sudo password. This duplication of the root folders in home is sym-linked to various folders in /...
I installed Salix from live-USB too, and my home directory is filled with root directories too. Is it correct? Could I remove this files? In my case, there are not symlinks:

Code: Select all

ale[home]$ ls -l
total 172
drwxr-xr-x 36 ale  users  4096 dic  9 15:05 ale
drwxr-xr-x  2 root root   4096 nov  6 18:33 bin
drwxr-xr-x  4 root root   4096 dic  8 11:40 boot
drwxr-xr-x 17 root root  69632 dic  8 11:40 dev
drwxr-xr-x 71 root root   4096 dic  8 14:46 etc
drwxr-xr-x  3 root root   4096 dic  8 11:41 home
drwxr-xr-x  7 root root   4096 nov  6 18:45 lib
drwxr-xr-x  2 root root   4096 nov  6 18:44 lib64
drwx------  2 root root  16384 dic  8 11:36 lost+found
drwxr-xr-x 16 root root   4096 nov  6 18:31 media
drwxr-xr-x 10 root root   4096 nov  6 18:31 mnt
drwxr-xr-x  2 root root   4096 jun 10  2007 opt
drwxr-xr-x  2 root root   4096 oct  6  1997 proc
drwx------  7 root root   4096 dic  8 12:17 root
drwxr-xr-x  5 root root   4096 dic  8 11:41 run
drwxr-xr-x  2 root root  12288 nov  6 18:46 sbin
drwxr-xr-x  2 root root   4096 abr  8  2007 srv
drwxr-xr-x  2 root root   4096 may 12  2004 sys
drwxrwxrwt  6 root root   4096 dic  8 14:46 tmp
drwxr-xr-x 16 root root   4096 nov  6 18:31 usr
drwxr-xr-x 14 root root   4096 nov  6 18:33 var
In GRUB2 appears menú options for Slackware 14.2 in /home and / partitions :shock:
westms
Posts: 298
Joined: 17. Mar 2013, 18:51

Re: Installed KDE from repositories problems with KDE su

Post by westms »

aleXimon wrote:
jallen wrote: I installed Salix from the live-USB and screwed up the install because my home directory is filled with a duplication of root directories – perhaps this is why KDE doesn’t recognize my sudo password. This duplication of the root folders in home is sym-linked to various folders in /...
I installed Salix from live-USB too, and my home directory is filled with root directories too. Is it correct? Could I remove this files? In my case, there are not symlinks:
aleXimon wrote:In GRUB2 appears menú options for Slackware 14.2 in /home and / partitions :shock:
Are you using Slackware or Salix?



You are using wrong terms. The directory '/home' is not your home directory, but the directory where the home directories of all users are created. In these home directories are then the data of the respective users, eg: '/home/ale/downloads'.

In your list, there is only one home directory in '/home', namely:

Code: Select all

    drwxr-xr-x 36 ale  users  4096 dic  9 15:05 ale
Then there may still be:

Code: Select all

    drwx------  2 root root   4096 xxxxxxxxxxxx lost+found
The other directories should not be there.

You have created at least one partition, maybe two or three partitions during the installation, or provided already existing ones.

One of the partitions is connected to the directory part '/', where the 'system' is placed. Another partition, if present, is connected to '/home' where the users' home directories are located. If present, the third partition is connected to 'swap'.

An empty directory '/home' is also created in root directory '/'. If no seperate partition exists for 'home', the home directories are created in this directory '/home'. If a separate partition exists for 'home', the home directories are stored there. The empty directory '/home' in the root directory (of course) then is used as the mountpoint.

It looks to me as if you had, when you were asked where the system is to be installed, '/home' specified.
This would explain why paths like /home/home and e.g. /home/bin exist.

Please show the outputs of the program calls:

Code: Select all

$ cat /etc/fstab

$ ls -li /

$ ls -li /home

$ ls -li /home/home
User avatar
aleXimon
Posts: 11
Joined: 3. Sep 2013, 01:53
Location: Rosario, Argentina

Re: Installed KDE from repositories problems with KDE su

Post by aleXimon »

Thanks!
I have one partition for / and other one for /home.
It is possible that the files have been left from a previous installation on that partition (I guess the SLI does not format the /home partition before installing).

Code: Select all

ale[~]$ cat /etc/fstab
proc /proc proc defaults 0 0
sysfs /sys sysfs defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
/dev/sda7 / ext4 defaults 1 1
/dev/sda9 /home ext4 defaults 1 1
/dev/sda1 /boot/efi vfat defaults 1 0 
/dev/sda8  swap  swap defaults  0  0
/dev/sda3 /media/Trabajo ntfs-3g defaults,nofail 0 0
/dev/sda6 /media/Media ntfs-3g defaults,nofail 0 0
ale[~]$ ls -li /
total 84
2359297 drwxr-xr-x   2 root root  4096 dic  8 18:45 bin
1835009 drwxr-xr-x   4 root root  4096 dic  8 11:55 boot
   1025 drwxr-xr-x  18 root root  5580 dic 10 09:59 dev
2097153 drwxr-xr-x  74 root root  4096 dic 10 10:06 etc
      2 drwxr-xr-x  23 root root  4096 dic  8 11:55 home
3670017 drwxr-xr-x   7 root root  4096 nov  6 18:45 lib
1179649 drwxr-xr-x   2 root root  4096 dic  8 14:58 lib64
     11 drwx------   2 root root 16384 dic  8 11:50 lost+found
3145729 drwxr-xr-x  18 root root  4096 dic  8 15:56 media
2621441 drwxr-xr-x  10 root root  4096 nov  6 18:31 mnt
2883585 drwxr-xr-x   6 root root  4096 dic 10 02:04 opt
      1 dr-xr-xr-x 217 root root     0 dic 10  2016 proc
2228225 drwx------   8 root root  4096 dic  8 17:18 root
   9175 drwxr-xr-x  10 root root   240 dic 10 10:02 run
1310721 drwxr-xr-x   2 root root 12288 nov  6 18:46 sbin
2490369 drwxr-xr-x   2 root root  4096 abr  8  2007 srv
      1 dr-xr-xr-x  13 root root     0 dic 10  2016 sys
3538945 drwxrwxrwt  17 root root  4096 dic 10 10:18 tmp
 393217 drwxr-xr-x  16 root root  4096 nov  6 18:31 usr
3276801 drwxr-xr-x  14 root root  4096 nov  6 18:33 var
ale[~]$ ls -li /home
total 172
 131074 drwxr-xr-x 39 ale  users  4096 dic 10 10:01 ale
2097153 drwxr-xr-x  2 root root   4096 nov  6 18:33 bin
2228225 drwxr-xr-x  4 root root   4096 dic  8 11:40 boot
 524289 drwxr-xr-x 17 root root  69632 dic  8 11:40 dev
2752513 drwxr-xr-x 71 root root   4096 dic  8 14:46 etc
2621441 drwxr-xr-x  3 root root   4096 dic  8 11:41 home
 786433 drwxr-xr-x  7 root root   4096 nov  6 18:45 lib
 262145 drwxr-xr-x  2 root root   4096 nov  6 18:44 lib64
     11 drwx------  2 root root  16384 dic  8 11:36 lost+found
 655361 drwxr-xr-x 16 root root   4096 nov  6 18:31 media
2359297 drwxr-xr-x 10 root root   4096 nov  6 18:31 mnt
 131073 drwxr-xr-x  2 root root   4096 jun 10  2007 opt
 917505 drwxr-xr-x  2 root root   4096 oct  6  1997 proc
1179649 drwx------  7 root root   4096 dic  8 12:17 root
 393217 drwxr-xr-x  5 root root   4096 dic  8 11:41 run
1572865 drwxr-xr-x  2 root root  12288 nov  6 18:46 sbin
1703937 drwxr-xr-x  2 root root   4096 abr  8  2007 srv
1966081 drwxr-xr-x  2 root root   4096 may 12  2004 sys
2490369 drwxrwxrwt  6 root root   4096 dic  8 14:46 tmp
1048577 drwxr-xr-x 16 root root   4096 nov  6 18:31 usr
1835009 drwxr-xr-x 14 root root   4096 nov  6 18:33 var
ale[~]$ ls -li /home/home
total 4
2621442 drwxr-xr-x 22 ale users 4096 dic  8 12:18 ale
ale[~]$ 
Then, if i do:

Code: Select all

cd /home/home/ale
I have a fresh installed list of directories
Could I remove this files?
djemos
Salix Warrior
Posts: 1433
Joined: 29. Dec 2009, 13:45
Location: Greece

Re: Installed KDE from repositories problems with KDE su

Post by djemos »

aleXimon wrote:Thanks!
I have one partition for / and other one for /home.
It is possible that the files have been left from a previous installation on that partition (I guess the SLI does not format the /home partition before installing).
Sli format the /home partition if you told it so, checking the "format home partition" checkbox.
jallen
Posts: 4
Joined: 5. Dec 2016, 01:07

Re: Installed KDE from repositories problems with KDE su

Post by jallen »

While all of this chatter about / and /home is entertaining, it has nothing to do with the topic in regards to why the sudo password isn’t recognized in KDE desktop but works as it should XFCE and why sudo works from the terminal.

I reinstalled Salix. Home now houses my user folder and a lost + found folder. Added kdesurc file to ~/.kde/share/config/ with code suggested by djemos but to no avail.

Still doesn’t work.

I can still use KDE but if I want to use gslapt for example I have to type sudo gslapt or to get the system clock I have to type sudo gtkclocksetup. All applications requiring a password to gain access can be accessed through the terminal because the sudo password works from terminal.

I looked in /usr/lib64/kde4/libexec/ to check out kdm_config. I thought the line "allow root login" would be set to false but it was set to true.

I wonder if I had installed KDE from run-level 3 and then run xwmconfig and startx and then reset run-level to 4, add the kdesurc to .kde/share/config/ and reboot all the links would be properly set and the settings from XFCE would inherited by KDE? That by installing from XFCE, then logging out and then logging to KDE breaks some symlink? Just guessing.

I guess I could just add root with password and remove myself from wheel group – but how do I add root if root is locked? Is it locked? Adding root would give me a user password (the previous sudo password) and a new root password. I would think then that KDE would accept the “real” root password. How do add root user??? Having root and user passwords would work fine for me if it is doable.

Any suggestions
westms
Posts: 298
Joined: 17. Mar 2013, 18:51

Re: Installed KDE from repositories problems with KDE su

Post by westms »

aleXimon wrote:Then, if i do:

Code: Select all

cd /home/home/ale
I have a fresh installed list of directories
Do you want to say it looks in the directory just about this:

Code: Select all

$ ls -la
total 516
drwxr-xr-x  74 ale users 24576 Dez 10 22:01 ./
drwxr-xr-x   5 root root  4096 Nov 13  2014 ../
-rw-------   1 ale users  8286 Dez 10 22:01 .ICEauthority
-rw-------   1 ale users   121 Dez 10 22:01 .Xauthority
-rw-r--r--   1 ale users   149 Aug 10  2009 .Xresources
[...]
drwxr-xr-x  14 ale users  4096 Dez 10 12:01 Desktop/
drwxr-xr-x  32 ale users 36864 Dez  1 01:29 Downloads/
drwxr-xr-x   2 ale users  4096 Jan 15  2015 Videos/
$
Can you continue this spelling always further like this:

Code: Select all

ls -li /home
ls -li /home/home
ls -li /home/home/home
ls -li /home/home/home/home
ls -li /home/home/home/home/home
ls -li /home/home/home/home/home/home
and are there always the directories from the root directory to see?
If so, do the directories have content? E.g.

Code: Select all

/home/bin
/home/home/bin
/home/home/home/bin
If they are not empty, who owns e.g. cat

Code: Select all

ls -li /home/home/bin/cat
and are then the inode numbers / index numbers
from /home/bin/cat identical to /home/home/bin/cat ?

Code: Select all

ls -li /home/bin/cat
ls -li /home/home/bin/cat
aleXimon wrote:Could I remove this files?
I would say: no! As long as you do not know how this strangely designed file system was created, operations can lead to further errors.

If the index numbers are not identical, something went wrong when the user was created or at a later time. Then the problem, perhaps, can be corrected by recursive deletion. If directories or files in this faulty tree do not have ownership ale:users, the recursive deletion must be done by the superuser, and it may be dangerous.

If they are identical, the file system on the home partition is defective. Because all directories and files with identical index numbers would be 'hard linked' to each other.

Before that, you should have the file system checked for /dev/sda9 by e2fsck. If this finds errors, which I very strongly assume, then a deletion would not fix the errors.

To check the file system, quit all applications. Unmount all external data carriers. Change to Runlevel 1. Execute cd / . Execute sync. Then execute all the following commands as rootuser / superuser or with sudo prefix.

Code: Select all

umount -r /home
or

Code: Select all

umount -r /dev/sda9
then

Code: Select all

e2fsck -vfn /dev/sda9
If e2fsck shows errors, you can try:

Code: Select all

e2fsck -vfy /dev/sda9
or

Code: Select all

e2fsck -vfp /dev/sda9
See the differences for switches 'y' and 'p' in the manual: man e2fsck.

Then

Code: Select all

shutdown -r now
or

Code: Select all

reboot
In your place, I would give up, however, as soon as errors are displayed, because the effort is not worth for you. Your home directory contains, so shortly after the installation, still no important data. Instead, I would perform a new installation. At the appropriate point during the installation, I would delete the partition and write the partition table immediately (delete command, write command). Then re-create the partition, specifying the correct partition type (probably 8300). Then write the partition table again immediately. I would do this with /dev/sda9 and /dev/sda7. It does not hurt to perform the operation with the swap partition (partition type probably 8200). This ensures that the partition table for these partitions is set correctly. In the further course of the installation, the two partitions (8300) must be assigned to the directory trees '/' and '/home', formatted and provided with the EXT4 file system. I do not know how the SalixLive installation offers that. In the non-live Salix installation, you can format partitions 'extensively' instead of 'quick'. If it is a HDD, a low-level formatting (extensively) gives the S.M.A.R.T firmware the possibility to replace defective sectors with reserve sectors.

There are NTFS-3G partitions on the hard drive. Also, the partition numbering is not continuous. This is generally not a problem, but if Windows is installed, this operating system can also be responsible for a possible damage to the EXT file system. Please do not start Windows until the error is fixed. Also responsible may be a faulty partitioning with overlapping partitions starts and ends.
Post Reply