shadow.service failed [SOLVED]

Ask questions about Arch Linux ARM. Please search before making a new topic.

shadow.service failed [SOLVED]

Postby nickarchpi2 » Mon May 16, 2016 3:20 pm

Hi all. I'm fairly new to running maintenance tasks on an Arch Linux ARM setup but I have fair Linux knowledge. Could someone help me out with this error I have come across when running systemctl --failed.

systemctl --failed
$this->bbcode_second_pass_code('', ' UNIT LOAD ACTIVE SUB DESCRIPTION
* shadow.service loaded failed failed Verify integrity of password and group files

LOAD = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB = The low-level unit activation state, values depend on unit type.

1 loaded units listed. Pass --all to see loaded but inactive units, too.
To show all installed unit files use 'systemctl list-unit-files'.')

So I ran systemctl status shadow.service

$this->bbcode_second_pass_code('', '* shadow.service - Verify integrity of password and group files
Loaded: loaded (/usr/lib/systemd/system/shadow.service; static; vendor preset: disabled)
Active: failed (Result: exit-code) since Mon 2016-05-16 00:00:12 UTC; 15h ago
Process: 2908 ExecStart=/usr/bin/pwck -r (code=exited, status=2)
Main PID: 2908 (code=exited, status=2)

May 16 00:00:12 alarmpi systemd[1]: Starting Verify integrity of password and group files...
May 16 00:00:12 alarmpi systemd[1]: shadow.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
May 16 00:00:12 alarmpi pwck[2908]: invalid password file entry
May 16 00:00:12 alarmpi pwck[2908]: delete line ''? No
May 16 00:00:12 alarmpi pwck[2908]: pwck: no changes
May 16 00:00:12 alarmpi systemd[1]: Failed to start Verify integrity of password and group files.
May 16 00:00:12 alarmpi systemd[1]: shadow.service: Unit entered failed state.
May 16 00:00:12 alarmpi systemd[1]: shadow.service: Failed with result 'exit-code'.')

Then I ran journalctl -xn

$this->bbcode_second_pass_code('', '-- Logs begin at Mon 2016-02-22 14:40:15 UTC, end at Mon 2016-05-16 15:13:09 UTC. --
May 16 14:54:33 alarmpi su[4956]: pam_unix(su:session): session closed for user root
May 16 14:55:16 alarmpi sudo[5030]: alarm : TTY=pts/0 ; PWD=/home/alarm ; USER=root ; COMMAND=/usr/bin/nano .bas
May 16 14:55:16 alarmpi sudo[5030]: pam_unix(sudo:session): session opened for user root by alarm(uid=0)
May 16 14:55:21 alarmpi sudo[5030]: pam_unix(sudo:session): session closed for user root
May 16 15:00:09 alarmpi smbd[315]: [2016/05/16 15:00:09.213188, 0] ../source3/printing/print_standard.c:69(std_pca
May 16 15:00:09 alarmpi smbd[315]: Unable to open printcap file /etc/printcap for read!
May 16 15:02:15 alarmpi su[5055]: (to root) alarm on pts/0
May 16 15:02:15 alarmpi su[5055]: pam_unix(su:session): session opened for user root by alarm(uid=1000)
May 16 15:13:09 alarmpi smbd[315]: [2016/05/16 15:13:09.946577, 0] ../source3/printing/print_standard.c:69(std_pca
May 16 15:13:09 alarmpi smbd[315]: Unable to open printcap file /etc/printcap for read!')

I did have an issue with the system failing to boot but that was down to an issue with fstab that I edited and sorted out. The system is running and booting fine but I would like to find out what it is causing the problem.

Thanks in advance!

EDIT..

I'm not sure if this is related but running journalctl -p 3 -xb
gives lines and lines of this error.

$this->bbcode_second_pass_code('', 'May 16 12:24:00 alarmpi smbd[315]: [2016/05/16 12:24:00.143384, 0] ../source3/printing/print_standard.c:69(std_pcap_cache_reload)
May 16 12:24:00 alarmpi smbd[315]: Unable to open printcap file /etc/printcap for read!')

A bit about my system.
Raspberry Pi 2 Model B
OS Arch Linux ARM for Rpi2
Packages added to initial install are
sudo, wget, samba, rtorrent, screen.
fstab has been edited to mount 3 partitions of a 1TB external USB drive to /mnt/
I did add a new user but removed it and just ssh into alarm. I can also get into root by typing su from the shell and sudo is working fine for alarm.
Last edited by nickarchpi2 on Tue May 17, 2016 9:49 am, edited 1 time in total.
nickarchpi2
 
Posts: 18
Joined: Tue Mar 22, 2016 9:43 pm

Re: shadow.service failed

Postby andiling » Tue May 17, 2016 5:05 am

You messed up with your password file...

$this->bbcode_second_pass_code('', 'status=2')
one or more bad password entries:
$this->bbcode_second_pass_code('', 'delete line ''?')

Run
$this->bbcode_second_pass_code('', '/usr/bin/pwck -r')
from shell or edit the file manually.
andiling
 
Posts: 74
Joined: Sun Mar 06, 2016 8:34 pm

Re: shadow.service failed

Postby nickarchpi2 » Tue May 17, 2016 9:40 am

Thank you.

It seems to be that there were 2 empty lines at the bottom of my passwd file. Deleted those and not getting the errors now.

The latter part of my issue was down to the [GLOBAL] part of smb.conf I just had to comment out the lines for the printer as I am not using printcap

Nice clean system for now. Thanks again!
nickarchpi2
 
Posts: 18
Joined: Tue Mar 22, 2016 9:43 pm


Return to User Questions

Who is online

Users browsing this forum: No registered users and 3 guests