execute command without sudo loadkeys


to load loadkeys without sudo

 
sudo  groupadd loadkeys                # you can use any group name 
sudo chgrp loadkeys /usr/bin/loadkeys  #add the binary to that group
sudo gpasswd -a YOURUSERNAME loadkeys  # add user to the group
sudo chmod 4750 /usr/bin/loadkeys      # setuid, group- and user-only read and execution

some nice links
http://major.io/2007/02/13/chmod-and-the-mysterious-first-octet/
http://unix.stackexchange.com/questions/85374/loadkeys-gives-permission-denied-for-normal-user

THI METHOD DOESN’T WORK FOR ME MAH :s

this stuff will allow

to GROUP : loadkeys #if you want set a username just remove % and put instead of loadkeys your nickname

in the machine with host name: debianseren

#if you want know your machine name just type hostname in your terminal btw it’s in the terminal prompt king@arthur-SVE1513Y1ESI:/$ in this case it’s arthur-SVE1513Y1ESI

you can do it even modifying sudoers but i guess the best way it’s creating a new group like before said

or just open a terminal editor to do that ..and add to /etc/sudoers NOTE THAT THE ORDER IS VERY IMPORTANT IN THE SUDOERS
LIST SO YOU NEED TO ADD THIS LINE TO THE END ..

%loadkeys debianseren=(ALL)NOPASSWD:/bin/loadkeys

the stuff without text editor

echo '%loadkeys debianseren=(ALL)NOPASSWD:/bin/loadkeys' | sudo tee -a /etc/sudoers

EXAMPLE
user idiotuser will run loadkeys, in every hostname machine , without sudo

idiotuser ALL=(ALL)NOPASSWD:/bin/loadkeys

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

%d bloggers like this: