You are not logged in.

#1 2005-05-07 16:05:22

swazo
Member
Registered: 2005-04-20
Posts: 16

xlock issue

Just pacman -S xlockmore and it works if I run it as root.

If I try to run it as a regular user I get this:

[swazo@teflon ~]$ xlock
/home/swazo/.xlockrc: null crypted password

and it refuses to work. Any ideas?

Offline

#2 2005-05-08 02:32:20

sigSEGV
Member
Registered: 2005-03-31
Posts: 9

Re: xlock issue

Looks like the package doesn't install it as setgid, so it defaults to using a local password instead of your system password.

Do chmod g+s /usr/bin/xlock and it should work.

Offline

#3 2006-07-19 23:52:56

djscholl
Member
From: Michigan, USA
Registered: 2006-05-24
Posts: 56

Re: xlock issue

I found that I had to do both setuid and setgid to make xlock use my shadowed system password.

chmod g+s /usr/bin/xlock
chmod u+s /usr/bin/xlock

However, there is another workaround, if you don't want the security exposure of making the xlock binary suid. You can generate a password hash and store it in a file in your home directory for xlock to use.

openssl passwd yourscreensaverpasswordhere > .xlockrc

If you are not in your home directory, you need a full path on .xlockrc so it lands in your home directory. Your screensaver password is now set independently from your system password, and you can set them to the same string or something different. To change your screensaver password, simply rerun the openssl command. You no longer need suid because xlock is reading .xlockrc in your own home directory.

Offline

#4 2006-07-20 01:10:05

djscholl
Member
From: Michigan, USA
Registered: 2006-05-24
Posts: 56

Re: xlock issue

Have you ever experienced a sudden uptick in your IQ upon clicking the Submit button on a Forum? This is not my first time, either.

Don't do what I recommended in the previous post. This puts the cleartext password in your bash history file. Just run

openssl passwd > .xlockrc

and you will be prompted for the password twice, and it will not be echoed, nor will it appear in your bash history file.

Offline

Board footer

Powered by FluxBB