Linux Restrict Execution of /usr/sbin/userhelper to Console Users

I‘m CentOS Linux version 5.x user and I’d like to restrict execution of /usr/sbin/userhelper to console users only in xusers group?

/usr/sbin/userhelper is a helper interface to pam. From the man page:

This program provides a basic interface to change a user’s password, gecos information, and shell. The main difference between this program and its traditional equivalents is that prompts are written to standard out to make it easy for a GUI wrapper to interface to it as a child process.

Simply run the following command so that users in xusers group can use /usr/sbin/userhelper
groupadd xusers
usermod -aG xusers user1
usermod -aG xusers user2
usermod -aG xusers userN
chgrp xusers /usr/sbin/userhelper
chmod 4710 /usr/sbin/userhelper

Posted by: SXI ADMIN

The author is the creator of SXI LLC and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.

Total
0
Shares
Leave a Reply

Your email address will not be published. Required fields are marked *

Previous Post

How to Make Website WCAG Compliant?

Next Post

Link download Kali Linux 2020.1 (ISO + Torrent)

Related Posts