Solved

Need a command

Posted on 2009-06-29
6
378 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
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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.

757 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now