# Xscreensaver fails password [SOLVED]

## binro

After porting an existing system to a new box the screen-saver won't let me log back on to my session. I thought it was a bug in version 5.45 but I have just upgraded to V6.0 and I get the same problem. The system is identical to the old one except for the host name and, AFAICT, Xscreensaver doesn't use that. You can circumvent the problem by doing C-A-F1 to a console and killing xscreensaver, which makes it a bit useless from a security point of view! In the security log I see:

Jun 18 23:02:49 localhost unix_chkpwd[23824] check pass; user unknown

Jun 18 23:02:58 localhost unix_chkpwd[25282] check pass; user unknown

Jun 18 23:02:58 localhost unix_chkpwd[25282] password check failed for user (robin)

Jun 18 23:02:58 localhost xscreensaver-auth pam_unix(xscreensaver:auth): authentication failure;

logname= uid=1000 euid=1000 tty=:0 ruser= rhost=  user=robin

Jun 18 23:03:00 localhost xscreensaver-auth[23823] Failed login on display ":0" for "robin"

Any ideas?

Thanks

----------

## alamahant

Maybe try

```

equery u xscreensaver

cat /etc/pam.d/<something-xscreensaver>

```

----------

## Hu

How exactly did you create the new system?  We somewhat routinely see people make imperfect copies, and the bits that get lost (such as suid/xattr) show up as authentication problems.

----------

## binro

 *alamahant wrote:*   

> Maybe try
> 
> ```
> 
> equery u xscreensaver
> ...

 

```

# cat /etc/pam.d/xscreensaver 

# File autogenerated by pamd_mimic in pam eclass

auth    substack                system-auth

```

Exactly the same as the old system.   :Confused: 

----------

## binro

 *Hu wrote:*   

> How exactly did you create the new system?  We somewhat routinely see people make imperfect copies, and the bits that get lost (such as suid/xattr) show up as authentication problems.

 

With "rsync -avz <old> <new>". I was very careful. And I just installed a fresh copy. It's very strange. Everything else seems to work as expected.

----------

## alamahant

You need

```

rsync -aAXv (--delete) <old>/ <new>/

```

X for extended attributes

A for acls

If <old> is running you need --exclude

```

rsync -aAXv --delete --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} <old>/ <new>/

```

----------

## binro

Thanks for the rsync parameters. I am going to have to find the moral fibre to repeat the migration when almost everything works OK.   :Very Happy: 

----------

## alamahant

You dont have to repeat it.

Just re rsync it with the above parameters.

--delete will delete any files in <new> not present in <old>.

Do you want that?

----------

## Hu

If I am right, you could also fix this by reinstalling the package(s) for which the xattrs/ACLs were lost, since Portage should set them properly at install time.  Start with xscreensaver and pam.

----------

## binro

Ok, reinstalling pam fixed it.   :Smile:  If I get any more weirdness I guess that's the solution.

Thanks to all.

----------

