04-07-2011
A different kind of solution might be to use a special group. That is,
- make a new group with groupadd
- set all the files that must be accessed to that group with chgrp
- add the user to that supplementary group with usermod -a -G
- set the group permissions on all those files as required with chmod.
Then don't use any privilege escalation at all.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
All
I am running a few scripts through a cron job. This is for checking some key services that are running on by box. The problem is, everytime the cron runs, it sends a mail to the root account. The root account mails need to cleared every now and then. Is there some way I can stop these... (1 Reply)
Discussion started by: skotapal
1 Replies
2. Shell Programming and Scripting
Hello,
I have written a script that has a sudo command to change file permissions within it.
When I run the script manually, the sudo command inside of it works fine.
When the script is run through crontab I get the error "cron: not found".
It the same user profile that I am using... (6 Replies)
Discussion started by: WhotheWhat
6 Replies
3. Shell Programming and Scripting
Hi there, I have over 2000 systems (mainly Solaris) and I want to write a script that inserts a new root cronjob on each of those servers. obviously just adding a line to /var/spool/cron/crontabs/root looks like the easiest way, but i really dont want to have to send a HUP to crond on all boxes
... (3 Replies)
Discussion started by: rethink
3 Replies
4. Shell Programming and Scripting
Suppose user 'asdf' is not logged into server 'bbbb', but the server is up. User 'asdf' has cron job. Will it be executed? (1 Reply)
Discussion started by: thulasidharan2k
1 Replies
5. UNIX for Dummies Questions & Answers
Hi there,
I have an ESXi server and I need to shut it down every night (say at 11 for simplicity). To shut down the ESXi box remotely, I can send an SSH command "poweroff".
Basically my question is, is there any way that I can save the script on my DD-WRT router so that it will login to the... (3 Replies)
Discussion started by: georgeharris
3 Replies
6. UNIX for Dummies Questions & Answers
I've been through many threads before i decide to create a separate thread.
I can't really find the solution to my (simple) problem.
Here's what I'm trying to achieve:
As "canar" user I want to run a command, let's say "/opt/ocaml/bin/ocaml" as "duck" user.
The only to achieve this is to... (1 Reply)
Discussion started by: canar
1 Replies
7. UNIX for Dummies Questions & Answers
Hi there,
I need to create a crone job to backup certain files on my disk without root permissions.
Also if I will be able to edit cronetab then I need to know how to edit it with any editor other than vim :mad: (5 Replies)
Discussion started by: aelhosiny
5 Replies
8. Shell Programming and Scripting
I am trying a cron on root user to backup to tape using TAR command
here is the cron entry
11 08 * * 6 /erdhot1cron 2>&1 >> /test3/scripts/dba/erdhot1cron.log
here is script inside - edhot1cron
#!/bin/bash
vsysdt=`date +%d%m%y`
date
tar -cvf /dev/st0... (4 Replies)
Discussion started by: vijaymec50
4 Replies
9. Red Hat
I have a set of RHEL 5 boxes running our ERP software on Oracle databases. I need to allow my DBA's to su to oracle and one other account (banner) without knowing the oracle or banner password. But I need to prevent them from su'ing to any other user especially root. I only want them to be able to... (1 Reply)
Discussion started by: westmoreland
1 Replies
10. Shell Programming and Scripting
Hi,
i have two servers say server A and server B. i have a sudo user say user1 with full privilges on server A and B. i am trying to append the crontab entry of root from server A of server B with the following command. But its appending on A. i need to append it on server B.
please find the... (4 Replies)
Discussion started by: venkitesh
4 Replies
LEARN ABOUT DEBIAN
config::model::openssh
Config::Model::OpenSsh(3pm) User Contributed Perl Documentation Config::Model::OpenSsh(3pm)
NAME
Config::Model::OpenSsh - OpenSsh config editor
SYNOPSIS
invoke editor
The following will launch a graphical editor (if Config::Model::TkUI is installed):
sudo cme edit sshd
command line
This command will add a "Host Foo" section in "~/.ssh/config":
cme modify ssh Host:Foo ForwardX11=yes
programmatic
This code snippet will remove the "Host Foo" section added above:
use Config::Model ;
use Log::Log4perl qw(:easy) ;
my $model = Config::Model -> new ( ) ;
my $inst = $model->instance (root_class_name => 'Ssh');
$inst -> config_root ->load("Host~Foo") ;
$inst->write_back() ;
DESCRIPTION
This module provides a configuration editors (and models) for the configuration files of OpenSsh. ("/etc/ssh/sshd_config",
/etc/ssh/ssh_config and "~/.ssh/config").
This module can also be used to modify safely the content of these configuration files from a Perl programs.
Once this module is installed, you can edit "/etc/ssh/sshd_config" with run (as root) :
# cme edit sshd
To edit /etc/ssh/ssh_config, run (as root):
# cme edit ssh
To edit ~/.ssh/config, run as a normal user:
# cme edit ssh
user interfaces
As mentioned in cme, several user interfaces are available with "edit" subcommand:
o A graphical interface is proposed by default if Config::Model::TkUI is installed.
o A Curses interface with option "cme edit ssh -ui curses" if Config::Model::CursesUI is installed.
o A Shell like interface with option "cme edit ssh -ui shell".
AUTHOR
Dominique Dumont, (ddumont at cpan dot org)
SEE ALSO
cme, Config::Model,
perl v5.14.2 2012-10-29 Config::Model::OpenSsh(3pm)