You are not logged in.

#1 2012-12-14 14:19:58

frigg
Member
From: Germany, Europe
Registered: 2006-10-30
Posts: 46

[SOLVED] after upgrade to systemd only login as root is allowed

Hi there,

I cant just login as user root after a upgrade to systemd. Please have a look here:
https://bugs.archlinux.org/task/33093

Are there any hints to solve this issue?

Last edited by frigg (2012-12-28 07:31:02)

Offline

#2 2012-12-14 19:10:42

frigg
Member
From: Germany, Europe
Registered: 2006-10-30
Posts: 46

Re: [SOLVED] after upgrade to systemd only login as root is allowed

There is a typo:

I can't login as a typical user without special privileges. Only the login as user root is accepted!

Offline

#3 2012-12-17 13:38:29

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: [SOLVED] after upgrade to systemd only login as root is allowed

** (process:553): WARNING **: Unable to register authentication agent: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.PolicyKit1 was not provided by any .service files
Error registering authentication agent: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.PolicyKit1 was not provided by any .service files (g-dbus-error-quark, 2)

those errors suggests polkit is either not installed or failed to start.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#4 2012-12-19 20:20:57

frigg
Member
From: Germany, Europe
Registered: 2006-10-30
Posts: 46

Re: [SOLVED] after upgrade to systemd only login as root is allowed

Hi,

[root@image1 ~]# ps -ef | grep polkit
root       463   459  0 21:11 pts/0    00:00:00 grep polkit
[root@image1 ~]# systemctl status polkit.service
polkit.service - Authorization Manager
  Loaded: loaded (/usr/lib/systemd/system/polkit.service; static)
  Active: inactive (dead)
    Docs: man:polkit(8)
  CGroup: name=systemd:/system/polkit.service

[root@image1 ~]# pacman -Q polkit
polkit 0.107-4

I guess polkit is running!

Because I'm working on command line and not in a desktop environment I have in /etc/systemd/system/ NOT the directory graphical.target.wants but instead multi-user.target.wants !

Any other/more hints or tips?

regards,

frigg

Offline

#5 2012-12-20 00:21:53

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,131

Re: [SOLVED] after upgrade to systemd only login as root is allowed

Please edit your posts to use [code ] [/code ] tags (minus spaces).

EDIT: Why do you think polkit is running? It seems to be installed but that's a different issue.

Last edited by cfr (2012-12-20 00:22:58)


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#6 2012-12-21 10:21:55

teateawhy
Member
From: GER
Registered: 2012-03-05
Posts: 1,138
Website

Re: [SOLVED] after upgrade to systemd only login as root is allowed

Polkit is not running! Its process should appear like this in ps:
00:00:00 /usr/lib/polkit-1/polkitd --no-debug
Also systemctl says polkit is "inactive (dead)"

frigg wrote:

Because I'm working on command line and not in a desktop environment I have in /etc/systemd/system/ NOT the directory graphical.target.wants but instead multi-user.target.wants !

This setting is unrelated to the problem, i use multi-user.target on my laptop and server, where polkit is working fine.
I think you can find out more by searching through the journal.

Offline

#7 2012-12-24 23:16:21

frigg
Member
From: Germany, Europe
Registered: 2006-10-30
Posts: 46

Re: [SOLVED] after upgrade to systemd only login as root is allowed

Hi teateawhy,

teateawhy wrote:

Polkit is not running! Its process should appear like this in ps:
00:00:00 /usr/lib/polkit-1/polkitd --no-debug
Also systemctl says polkit is "inactive (dead)"

Hm, how is this daemon started? As I'm not very familiar with systemd I guess polkitd should be started by dbusd? Is there anybody who can provide an answer?

Offline

#8 2012-12-25 00:27:24

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,131

Re: [SOLVED] after upgrade to systemd only login as root is allowed

Can you start the service manually? If not, what errors do you get?

Please use [code ][/code ] tags!

The wiki page on systemd will probably be useful.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#9 2012-12-25 11:09:36

frigg
Member
From: Germany, Europe
Registered: 2006-10-30
Posts: 46

Re: [SOLVED] after upgrade to systemd only login as root is allowed

Hi cfr,

cfr wrote:

Can you start the service manually? If not, what errors do you get?
The wiki page on systemd will probably be useful.


Well, I've red this doku but can't find any helpfull information about my issue. Do you have another maybe better link to the appropriate documentation?

Here is the output

 
# ps -ef | grep polkit
root       658   633  0 11:56 pts/0    00:00:00 grep polkit
#
# /usr/lib/polkit-1/polkitd
Error switcing to user polkitd: Error changing to home directory /: Permission denied
Exiting with code 1
# 

best regads an merry christmas,

frigg

Offline

#10 2012-12-25 11:35:18

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: [SOLVED] after upgrade to systemd only login as root is allowed

systemctl status polkit  and journalctl -b | grep polkit should also give info about the error.

Error switcing to user polkitd: Error changing to home directory /: Permission denied

That suggest something is wrong with the polkitd user.
check your /etc/shadow file, it should have something like this :

polkitd:!:15644:0:99999:7:::

Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#11 2012-12-25 14:03:57

frigg
Member
From: Germany, Europe
Registered: 2006-10-30
Posts: 46

Re: [SOLVED] after upgrade to systemd only login as root is allowed

Hi Lone_Wolf,

Lone_Wolf wrote:

systemctl status polkit  and journalctl -b | grep polkit should also give info about the error.

Error switcing to user polkitd: Error changing to home directory /: Permission denied

That suggest something is wrong with the polkitd user.
check your /etc/shadow file, it should have something like this :

polkitd:!:15644:0:99999:7:::

OK, here it goes:

[root@image1 ~]# systemctl status polkit
polkit.service - Authorization Manager
          Loaded: loaded (/usr/lib/systemd/system/polkit.service; static)
          Active: inactive (dead)
            Docs: man:polkit(8)
          CGroup: name=systemd:/system/polkit.service

[root@image1 ~]#
[root@image1 ~]# journalctl -b | grep polkit
[root@image1 ~]# cat /etc/shadow | grep pol
polkitd:!:15648:0:99999:7:::
[root@image1 ~]#
[root@image1 ~]# cat /etc/passwd | grep polk
polkitd:x:102:102:Policy Kit Daemon:/:/bin/false
[root@image1 ~]#

Is this enough information for troubleshooting?

best regards and merry christmas,

frigg

Offline

#12 2012-12-25 17:49:56

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,131

Re: [SOLVED] after upgrade to systemd only login as root is allowed

Note that you have an 8 where Lone_Wolf (and I) have a 4 in shadow. But I've no idea if this is significant or not.

Try starting the daemon using systemctl:

systemctl start polkitd.service

or

systemctl start polkit.service

I'm a bit confused because the install section of the polkitd.service file says it is wanted by graphical.target rather than multi-user.target and I'm also not certain what the difference between the two services is since the Exec lines look to be the same.

Even if starting it this way fails, the output might provide more clues.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#13 2012-12-25 22:01:24

frigg
Member
From: Germany, Europe
Registered: 2006-10-30
Posts: 46

Re: [SOLVED] after upgrade to systemd only login as root is allowed

Hi cfr and Lone_Wolf,

cfr wrote:

Note that you have an 8 where Lone_Wolf (and I) have a 4 in shadow. But I've no idea if this is significant or not.

I guess (hope :-)) it's not, because this is the lastchanged field, which indicates the last password change in days since Jan 1, 1970...

cfr wrote:

I'm a bit confused because the install section of the polkitd.service file says it is wanted by graphical.target rather than multi-user.target and I'm also not certain what the difference between the two services is since the Exec lines look to be the same.

Even if starting it this way fails, the output might provide more clues.

OK. maybe we got deeper in this issue and closer to a solution:

[root@image1 ~]# systemctl start polkitd.service
Failed to issue method call: Unit polkitd.service failed to load: No such file or directory. See system logs and 'systemctl status polkitd.service' for details.
[root@image1 ~]#
[root@image1 ~]# systemctl status polkitd.service
polkitd.service
          Loaded: error (Reason: No such file or directory)
          Active: inactive (dead)

[root@image1 ~]#
[root@image1 ~]# systemctl start polkit.service
Job for polkit.service failed. See 'systemctl status polkit.service' and 'journalctl -xn' for details.
[root@image1 ~]#
[root@image1 ~]# systemctl status polkit.service
polkit.service - Authorization Manager
          Loaded: loaded (/usr/lib/systemd/system/polkit.service; static)
          Active: failed (Result: exit-code) since Tue, 2012-12-25 22:51:02 CET; 14s ago
            Docs: man:polkit(8)
         Process: 475 ExecStart=/usr/lib/polkit-1/polkitd --no-debug (code=exited, status=1/FAILURE)
          CGroup: name=systemd:/system/polkit.service

Dec 25 22:51:02 image1 systemd[1]: Starting Authorization Manager...
Dec 25 22:51:02 image1 systemd[1]: polkit.service: main process exited, cod...RE
Dec 25 22:51:02 image1 systemd[1]: Failed to start Authorization Manager.
Dec 25 22:51:02 image1 systemd[1]: Unit polkit.service entered failed state
[root@image1 ~]#
[root@image1 ~]# journalctl -xn
-- Logs begin at Tue, 2012-12-25 22:45:56 CET, end at Tue, 2012-12-25 22:51:02 C
Dec 25 22:46:40 image1 sshd[429]: Server listening on 0.0.0.0 port 22.
Dec 25 22:46:40 image1 sshd[429]: Server listening on :: port 22.
Dec 25 22:47:01 image1 crond[321]: FILE /var/spool/cron/root USER root PID 432 j
Dec 25 22:49:47 image1 sshd[453]: Accepted password for root from 192.168.1.6 po
Dec 25 22:49:47 image1 sshd[453]: pam_unix_session(sshd:session): session opened
Dec 25 22:49:47 image1 systemd-logind[329]: New session 2 of user root.
-- Subject: A new session 2 has been created for user root
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- Documentation: http://www.freedesktop.org/wiki/Software/systemd/multiseat
-- Documentation: http://www.freedesktop.org/wiki/Software/systemd/catalog/8d456
--
-- A new session with the ID 2 has been created for the user root.
--
-- The leading process of the session is 453.
Dec 25 22:51:02 image1 systemd[1]: Starting Authorization Manager...
-- Subject: Unit polkit.service has begun with start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- Documentation: http://www.freedesktop.org/wiki/Software/systemd/catalog/7d495
--
-- Unit polkit.service has begun starting up.
Dec 25 22:51:02 image1 systemd[1]: polkit.service: main process exited, code=exi
Dec 25 22:51:02 image1 systemd[1]: Failed to start Authorization Manager.
-- Subject: Unit polkit.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- Documentation: http://www.freedesktop.org/wiki/Software/systemd/catalog/be02c
--
-- Unit polkit.service has failed.
--
-- The result is failed.
Dec 25 22:51:02 image1 systemd[1]: Unit polkit.service entered failed state
[root@image1 ~]#

best regards,

frigg

Offline

#14 2012-12-25 22:57:50

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,131

Re: [SOLVED] after upgrade to systemd only login as root is allowed

So are you actually missing files? Either .service files or polkit files? Have you tried reinstalling the relevant packages, if so?


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#15 2012-12-26 09:35:01

frigg
Member
From: Germany, Europe
Registered: 2006-10-30
Posts: 46

Re: [SOLVED] after upgrade to systemd only login as root is allowed

Hi cfr,

cfr wrote:

So are you actually missing files? Either .service files or polkit files? Have you tried reinstalling the relevant packages, if so?

I've just reinstalled polkit. Is there any other relevant package I have to reinstall?

Should I perform a

ls -l -R

on a subdirectory to get a complete list? But I have to know the starting (sub)dir...

best regards and merry christmas,

frigg

Offline

#16 2012-12-26 18:37:37

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,131

Re: [SOLVED] after upgrade to systemd only login as root is allowed

I may not be a great person to ask as I just discovered this:

$ pacman -Qo /usr/lib/systemd/system/polkit*
/usr/lib/systemd/system/polkit.service is owned by polkit 0.107-4
error: No package owns /usr/lib/systemd/system/polkitd.service

So I apparently have a file which I should not and I'm not sure why...


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#17 2012-12-26 23:10:14

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: [SOLVED] after upgrade to systemd only login as root is allowed

there's no /usr/lib/system/systemd/polkitd.service on my system.

frigg, run id polkitd
It should output something like this :

uid=102(polkitd) gid=102(polkitd) groups=102(polkitd)

The 102 may be a different number on your system, what matters is that there's both a user polkitd and a group polkitd.
If those are present, atleast we can be sure the user/group polkitd are present.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#18 2012-12-27 00:27:28

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [SOLVED] after upgrade to systemd only login as root is allowed

Why is everyone so concerned with polkit and less concerned with the more glaring failure: "su: warning: cannot change directory to /home/ickstadf: Permission denied"

Offline

#19 2012-12-27 02:13:11

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,131

Re: [SOLVED] after upgrade to systemd only login as root is allowed

falconindy wrote:

Why is everyone so concerned with polkit and less concerned with the more glaring failure: "su: warning: cannot change directory to /home/ickstadf: Permission denied"

In my case because I hadn't noticed the link to the bug report in the original post...

@frigg,
What are the permissions on /home (as opposed to just the contents of /home)?


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#20 2012-12-27 06:46:50

frigg
Member
From: Germany, Europe
Registered: 2006-10-30
Posts: 46

Re: [SOLVED] after upgrade to systemd only login as root is allowed

Lone_Wolf wrote:

there's no /usr/lib/system/systemd/polkitd.service on my system.

frigg, run id polkitd
It should output something like this :

uid=102(polkitd) gid=102(polkitd) groups=102(polkitd)

Hi Lone_Wolf,

seems to be right:

[root@image1 ~]# id polkitd
uid=102(polkitd) gid=102(polkitd) groups=102(polkitd)
[root@image1 ~]#

regards,

frigg

Offline

#21 2012-12-27 06:53:09

frigg
Member
From: Germany, Europe
Registered: 2006-10-30
Posts: 46

Re: [SOLVED] after upgrade to systemd only login as root is allowed

cfr wrote:
falconindy wrote:

Why is everyone so concerned with polkit and less concerned with the more glaring failure: "su: warning: cannot change directory to /home/ickstadf: Permission denied"

In my case because I hadn't noticed the link to the bug report in the original post...

@frigg,
What are the permissions on /home (as opposed to just the contents of /home)?

have a look:

[root@image1 ~]# ls -la /home
total 40
drwxrwx--T  5 root     root      4096 Dec 27 07:39 .
drwxrwx--T 20 root     root      4096 Dec  8 22:42 ..
drwx------  2 franki   franki    4096 Dec 13 21:49 franki
drwxr-xr-x 72 ickstadf ickstadf 12288 Dec 11 21:29 ickstadf
drwx------  2 root     root     16384 Sep 10  2007 lost+found
[root@image1 ~]#

maybe more interesting is this behavior:

[root@image1 ~]# /usr/lib/polkit-1/polkitd
Error switcing to user polkitd: Error changing to home directory /: Permission denied
Exiting with code 1
[root@image1 ~]#
[root@image1 ~]# usermod -d /var/empty polkitd
[root@image1 ~]#
[root@image1 ~]# /usr/lib/polkit-1/polkitd
Error switcing to user polkitd: Error changing to home directory /var/empty: Permission denied
Exiting with code 1
[root@image1 ~]#

best regards,

frigg

Offline

#22 2012-12-27 11:07:25

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [SOLVED] after upgrade to systemd only login as root is allowed

Clearly a systemd problem..........
</sarcasm>

Post the output of findmnt and the contents of your /etc/fstab.

Last edited by falconindy (2012-12-27 11:07:44)

Offline

#23 2012-12-27 14:09:48

frigg
Member
From: Germany, Europe
Registered: 2006-10-30
Posts: 46

Re: [SOLVED] after upgrade to systemd only login as root is allowed

Hi falconindy,

falconindy wrote:

Clearly a systemd problem..........
</sarcasm>

Post the output of findmnt and the contents of your /etc/fstab.

That's a good support info :-)

OK. Let's drill down:

[root@image1 ~]# findmnt
TARGET                           SOURCE     FSTYPE     OPTIONS
/                                /dev/sda3  ext3       rw,relatime,data=ordered
├─/proc                          proc       proc       rw,nosuid,nodev,noexec,relatime
│ └─/proc/sys/fs/binfmt_misc     systemd-1  autofs     rw,relatime,fd=23,pgrp=1,timeout=300,minproto=5,maxproto=5,direct
├─/sys                           sys        sysfs      rw,nosuid,nodev,noexec,relatime
│ ├─/sys/kernel/security         securityfs securityfs rw,nosuid,nodev,noexec,relatime
│ ├─/sys/fs/cgroup               tmpfs      tmpfs      rw,nosuid,nodev,noexec,mode=755
│ │ ├─/sys/fs/cgroup/systemd     cgroup     cgroup     rw,nosuid,nodev,noexec,relatime,release_agent=/usr/lib/systemd/systemd-cgroups-a
│ │ ├─/sys/fs/cgroup/cpuset      cgroup     cgroup     rw,nosuid,nodev,noexec,relatime,cpuset
│ │ ├─/sys/fs/cgroup/cpu,cpuacct cgroup     cgroup     rw,nosuid,nodev,noexec,relatime,cpuacct,cpu
│ │ ├─/sys/fs/cgroup/memory      cgroup     cgroup     rw,nosuid,nodev,noexec,relatime,memory
│ │ ├─/sys/fs/cgroup/devices     cgroup     cgroup     rw,nosuid,nodev,noexec,relatime,devices
│ │ ├─/sys/fs/cgroup/freezer     cgroup     cgroup     rw,nosuid,nodev,noexec,relatime,freezer
│ │ ├─/sys/fs/cgroup/net_cls     cgroup     cgroup     rw,nosuid,nodev,noexec,relatime,net_cls
│ │ └─/sys/fs/cgroup/blkio       cgroup     cgroup     rw,nosuid,nodev,noexec,relatime,blkio
│ └─/sys/kernel/debug            none       debugfs    rw,relatime
├─/dev                           dev        devtmpfs   rw,nosuid,relatime,size=1546964k,nr_inodes=216808,mode=755
│ ├─/dev/shm                     tmpfs      tmpfs      rw,nosuid,nodev
│ ├─/dev/pts                     devpts     devpts     rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000
│ ├─/dev/mqueue                  mqueue     mqueue     rw,relatime
│ └─/dev/hugepages               hugetlbfs  hugetlbfs  rw,relatime
├─/run                           run        tmpfs      rw,nosuid,nodev,relatime,mode=755
├─/tmp                           tmpfs      tmpfs      rw,nosuid,nodev,relatime
├─/media/usbhd-sda3              /dev/sda3  ext3       rw,relatime,data=ordered
├─/media/usbhd-sda1              /dev/sda1  ext2       rw,relatime
├─/media/usbhd-sda4              /dev/sda4  ext3       rw,relatime,data=ordered
├─/boot                          /dev/sda1  ext2       rw,relatime
└─/home                          /dev/sda4  ext3       rw,relatime,data=ordered
[root@image1 ~]#
[root@image1 ~]#
[root@image1 ~]# cat /etc/fstab
#
# /etc/fstab: static file system information
#
# <file system>        <dir>         <type>    <options>          <dump> <pass>
#devpt                  /dev/pts      devpts    defaults            0      0
#shm                    /dev/shm      tmpfs     defaults            0      0
# debugfs for use of usbview:
none            /sys/kernel/debug     debugfs   defaults            0      0
tmpfs                  /tmp          tmpfs     nodev,nosuid        0       0

/dev/cdrom             /mnt/cdrom    iso9660   ro,user,noauto,unhide   0      0
/dev/dvd               /mnt/dvd      udf       ro,user,noauto,unhide   0      0
/dev/sda1              /boot         ext2      defaults            0 1
/dev/sda2              swap          swap      defaults            0 0
/dev/sda3              /             ext3      defaults            0 1
/dev/sda4              /home         ext3      defaults            0 1
[root@image1 ~]#

As mentioned some postings above I changed the default target to boot into from graphical.target to multi-user.target using systemctl:
systemctl enable multi-user.target

No more changes were done!

Furthermore interesting is the following message:

[root@image1 ~]# hostnamectl status
Failed to issue method call: The name org.freedesktop.hostname1 was not provided by any .service files
[root@image1 ~]#
[root@image1 ~]# cat /etc/hostname
image1
[root@image1 ~]#
[root@image1 ~]# ls -l /etc/hostname
-rw-r--r-- 1 root root 7 Oct  3 23:05 /etc/hostname
[root@image1 ~]#

And at last there are the strange /media/usbhd-sdaX drives:

[root@image1 ~]# cd /media/
[root@image1 media]# ls -lisaF
total 29
3319457 4 drwxr-xr-x  8 root root 4096 Dec 11 21:30 ./
      2 4 drwxrwx--T 20 root root 4096 Dec  8 22:42 ../
3319528 4 drwxr-xr-x  2 root root 4096 Oct 27 20:30 NO_NAME/
3319591 4 drwxr-xr-x  2 root root 4096 Jul 28 10:41 REVIO-SD/
      2 1 drwxrwx--T  6 root root 1024 Dec 25 15:44 usbhd-sda1/
3319468 4 drwxrwx--T  2 root root 4096 Dec 11 21:30 usbhd-sda2/
      2 4 drwxrwx--T 20 root root 4096 Dec  8 22:42 usbhd-sda3/
      2 4 drwxrwx--T  5 root root 4096 Dec 27 07:39 usbhd-sda4/
[root@image1 media]# cd usbhd-sda4/
[root@image1 usbhd-sda4]# ls -la
total 40
drwxrwx--T  5 root     root      4096 Dec 27 07:39 .
drwxr-xr-x  8 root     root      4096 Dec 11 21:30 ..
drwx------  2 franki   franki    4096 Dec 13 21:49 franki
drwxr-xr-x 72 ickstadf ickstadf 12288 Dec 11 21:29 ickstadf
drwx------  2 root     root     16384 Sep 10  2007 lost+found
[root@image1 usbhd-sda4]#
[root@image1 usbhd-sda4]# cd ..
[root@image1 media]# ls usbhd-sda[1234]
usbhd-sda1:
coffee.bmp     debianlilo.bmp  grub.nonfunctional            inside.bmp         onlyblue.bmp
debian.bmp     grub            initramfs-linux-fallback.img  kconfig26.pacsave  tuxlogo.bmp
debian-de.bmp  grub-legacy     initramfs-linux.img           lost+found         vmlinuz-linux

usbhd-sda2:

usbhd-sda3:
bin  boot  dev  etc  home  lib  lost+found  media  mnt  opt  proc  root  run  sbin  srv  sys  tmp  usr  var

usbhd-sda4:
franki  ickstadf  lost+found
[root@image1 media]#

I've wrote/customized a udevrule for adding usb drives (usbstick, external usb drive,...):

[root@image1 ~]# cat //etc/udev/rules.d/11-media-by-label-auto-mount.rules
KERNEL!="sd[a-z][0-9]", GOTO="media_by_label_auto_mount_end"

# Import FS infos
IMPORT{program}="/sbin/blkid -o udev -p %N"

# Get a label if present, otherwise specify one
ENV{ID_FS_LABEL}!="", ENV{dir_name}="%E{ID_FS_LABEL}"
ENV{ID_FS_LABEL}=="", ENV{dir_name}="usbhd-%k"

# Global mount options
ACTION=="add", ENV{mount_options}="relatime"
# Filesystem-specific mount options (777/666 dir/file perms for ntfs/vfat)
ACTION=="add", ENV{ID_FS_TYPE}=="vfat|ntfs", ENV{mount_options}="$env{mount_options},utf8,gid=100,dmask=000,fmask=111"

# Mount the device
ACTION=="add", RUN+="/bin/mkdir -p /media/%E{dir_name}", RUN+="/bin/mount -o $env{mount_options} /dev/%k /media/%E{dir_name}", RUN+="/bin/chmod 1770 /media/%E{dir_name}"

# Clean up after removal
ACTION=="remove", ENV{dir_name}!="", RUN+="/bin/umount -l /media/%E{dir_name}", RUN+="/bin/rmdir /media/%E{dir_name}"

# Exit
LABEL="media_by_label_auto_mount_end"
[root@image1 ~]#

Should I reopen bug #33093 ?

best regards,

frigg

Offline

#24 2012-12-27 15:17:56

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [SOLVED] after upgrade to systemd only login as root is allowed

Your "drilling down" yields nothing of relevance or value. However, looking back...

[root@image1 ~]# ls -la /home
total 40
drwxrwx--T  5 root     root      4096 Dec 27 07:39 .

Why does your /home have these bizzare permissions? Please fix this.

frigg wrote:

Should I reopen bug #33093 ?

You've yet to display evidence of an actual bug.

Last edited by falconindy (2012-12-27 15:18:58)

Offline

#25 2012-12-27 16:05:11

bgc1954
Member
From: Edmonton, AB, Canada
Registered: 2006-03-14
Posts: 1,160

Re: [SOLVED] after upgrade to systemd only login as root is allowed

I recall seeing sometime ago people having problems with proper mounting and permissions due to your media-automount udev rule.  It used to be in the udev or usb storage wiki but was taken out some time ago probably due to the problems caused by it after introduction of systemd.

Last edited by bgc1954 (2012-12-27 16:06:56)


Time is a great teacher, but unfortunately it kills all its pupils ... - Louis Hector Berlioz

Offline

Board footer

Powered by FluxBB