GET permission for selected user

hr-ethadmin
Site Admin
Posts: 67
Joined: Fri May 31, 2013 1:04 pm

GET permission for selected user

Postby hr-ethadmin » Thu Oct 03, 2013 12:42 pm

GET permission for selected user :

These steps will allow only selected user or users in particular group to run GET commant on the server :
Please follow these steps :

]# cat /etc/group | grep getgrp to check if the group is already added, if yes then to know how many users are already added
]# groupadd getgrp -- to create a group on the server
]# chmod 750 /usr/bin/GET -- Give execute permission to group
]# chown root.getgrp /usr/bin/GET Add this group to GET file.
]# ll -ld /usr/bin/GET to check the permission of GET

Now we need to add the user to getgrp so that he gets execute permission on GET. Also getgrp should be secondary group of that user. Let the user be myuser1.

]# gpasswd -M myuser1 getgrp

]# cat /etc/group | grep getgrp -- to check if the user is added.

But if you add another user say myuser2 then please make sure that you mention both the user in your command as :

]# gpasswd -M myuser1,myuser2 getgrp

Coz if you dont mention both the user, this command will replace all the users with the user mentioned in your command. You should always run the cat command before adding any user so that you know how many users are already added.

The above steps will allow only root, myuser1 and myuser2 to execute GET command, all other will be denied.

Return to “Hostripples dedicated Servers (Linux/Windows)”

Who is online

Users browsing this forum: No registered users and 8 guests