Skip to content

Changing uInput Device Permission

November 11, 2013

Target: To change the /dev/uinput permission to allow non-root application to open/read/write the device file

Creating A New Group: uInput

  1. Add new group by following command
    1. sudo groupdadd -f uinput
    2. sudo gpasswd -a username uinput
  2. Verify username has been added into uinput group
    1. groups

Creating New udev Rule

  1. create a new file name: /etc/udev/rules.d/99-input.rules
  2. Insert the following in the code
    1. KERNEL==”uinput”, GROUP=”uinput”, MODE:=”0660″
  3. Machine reboot
  4. Verify settings by following command:
    1. ls -l /dev/uinput
      1. crw-rw---- 1 root uinput 10, 223 Nov 11 15:35 /dev/uinput
Advertisements

From → Linux

5 Comments
  1. Dozoi permalink

    Beware, the blog software has replaced the quotes in the udev file.
    To apply the rules without rebooting:
    sudo sh -c ‘udevadm control –reload; udevadm trigger -v –name-match uinput’

  2. rolf permalink

    To apply the rules without rebooting, the commands are actually(as of April 2016):

    sudo udevadm control –reload
    sudo udevadm trigger –type=devices –sysname-match=uinput

  3. okam permalink

    after following your instructions, i get as result
    crw——- 1 root root 10, 223 Feb 6 12:32 /dev/uinput

    is that correct result or not?

    • As shown in last item, it should as below:
      crw-rw—- 1 root uinput 10, 223 Nov 11 15:35 /dev/uinput

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s

%d bloggers like this: