Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Need a command

Posted on 2009-06-29
6
Medium Priority
?
387 Views
Last Modified: 2013-12-15
I need to give access to one group ...please advice with the commnads .
"sudo su  CDE* and sudo su -*XYZ access to ABCD account of the following servers"

Please advice

Thanks in advance!
0
Comment
Question by:prashantchauhan
6 Comments
 
LVL 14

Expert Comment

by:Deepak Kosaraju
ID: 24737251
Question is not clear can you elaborate.
0
 
LVL 23

Expert Comment

by:savone
ID: 24737343
I agree, it is not clear what your question is asking for.
0
 

Author Comment

by:prashantchauhan
ID: 24743377
sudo su  CDE* and sudo su -*XYZ(Folders) access to ABCD(It is a user group to who i need give sudo access for soem folders) account of the following servers"
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 16

Expert Comment

by:ai_ja_nai
ID: 24743463
Let me understand, because it's still really bad explained: do you need to give sudo access to a group of users? Or do you need to simply give rwx permission to a certain group?
0
 

Author Comment

by:prashantchauhan
ID: 24753681
I Apologies....Right one is "do you need to give sudo access to a group of users".


Thank You
0
 
LVL 4

Accepted Solution

by:
NVRAM earned 1000 total points
ID: 24754017
If you try "man sudo" (under "FILES") it tells you which file under "/etc/" contains the configuration for "sudo" -- it sounds like you haven't tried that yet (but maybe you did, you really need to elaborate more on your questions and what you have tried so far!)

Within the "sudo" configuration file, there are lots of commented examples -- you can easily alias a list of commands and grant permissions for those to individual users or groups.

BUT - if I understand your wish, it is to:
   - Grant to user "ABCD" (on multiple servers) the ability to:
     - "su" to accounts with names starting with "CDE" or ending with "XYZ".

It appears you can configure "sudo" to run "su" with your desired arguments, but there doesn't seem to be any pattern-matching capability, so you would need to configure it to handle each target user name.

If there are more than a few, or if it changes often  you could easily create a small program (should take about 20-30 lines of C) to:
  1- confirm the UID or GID of the user (optional if run via "sudo"),
  2- confirm that the requested username matches the desired criteria,
  3- exec "su" with the desired parameters.

You can either create this program as SETUID root or allow it with "sudo"  The former is easier, but requires you be careful in step #1.  But "sudo" could do this for you and provide you with some record-keeping about when the program was used.

It would be possible, but is probably a security hole, to create this program as a shell script -- can anyone enlighten us/me if "sudo" grants on shell scripts are considered safe or bad?

=====

An entirely different solution would be to install public keys in target users' ~/.ssh directory and allow access via "ssh".  Might be harder to setup/configure but I can't tell from your description.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

1. Introduction As many people are interested in Linux but not as many are interested or knowledgeable (enough) to install Linux on their system, here is a safe way to try out Linux on your existing (Windows) system. The idea is that you insta…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses
Course of the Month5 days, 22 hours left to enroll

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question