Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm running Xubuntu 12.04 and use the LightDM. I want to restrict access to the machine as a kind of parental control. This is how it should work

I hook in a script that executes just before the greeter comes up. Within that script some awk processing will read an entry in a config file and will trigger a usermod -L or usermod -U depending on whether the user is allowed to login.

While user is logged, a cron job will count down the entry in the config and forces a xfce4-session-logout if time is up.

A cron job running on a server will upload the "credits" on a daily base.

How is this idea?

That's theory, now for the problems

It appears for some unknown reason, the usermod command is not executed, neither as part of a display-setup-script nor within the greeter-setup-script. I wrote a small sandbox script

usermod -L johndoe 2>error.txt
touch /etc/blabla 2>error.txt

The script is executing, cause the blabla file is existing. That means that the script must have been executed with root privileges. error.txt is empty but the usermod command has just no effect.

Is this a bug or a feature. What's wrong?

Best regards and thank you Oli

share|improve this question
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.