Solved

Need a command

Posted on 2009-06-29
6
384 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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 250 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
AWS EC2 HTTP & HTTPS 2 119
trouble on installing syslog-ng on CentOS 7 7 157
Apache module 5 87
ifconfig related commands 6 23
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses

751 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