03-12-2009
Thanks pludi .
But these is no sudoer file in /etc folder. Is there any other path or file where these setting can be done.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
here is my script:
#!/bin/sh
cd /Users/a
echo "what is the name of the file u want?"
read var1
var1=$var1... (1 Reply)
Discussion started by: cleansing_flame
1 Replies
2. Solaris
I am trying to set up sudo for a command, but do not want to specify the arguments that can be passed into it. I want the user who is using sudo to be able to pass in the arguments they want. I am fairly sure I know how to do this with RBAC in Solaris 10, but for reasons I will not get into I... (1 Reply)
Discussion started by: synchro
1 Replies
3. UNIX for Advanced & Expert Users
Hello,
What does the below sudo command provide access to, does it allow a user to su to any other user except root.
sudo !/usr/bin/su * (1 Reply)
Discussion started by: sophos
1 Replies
4. Shell Programming and Scripting
cat test.sh
sudo mount -t vfat /dev/sda7 /media/Ddrive
If i double click the test.sh file and select run in terminal then the terminal prompts for password.
How can i avoid typing password?
Or if i double click test.sh file and select run then nothing happens.
What i'm trying "Double... (3 Replies)
Discussion started by: cola
3 Replies
5. UNIX for Dummies Questions & Answers
Hi! I'm very new to unix, so please keep that in mind with the level of language used if you choose to help :D Thanks!
When attempting to use sudo on and AIX machine with oslevel 5.1.0.0, I get the following error:
exec(): 0509-036 Cannot load program sudo because of the following errors:... (1 Reply)
Discussion started by: Chloe123
1 Replies
6. Linux
Hi I wanted to add a group using 1 id which is not root but has some sudo privileges.
test@test>sudo -l
gives this
(root) NOPASSWD: /usr/bin/passwd, /usr/sbin/useradd, /usr/sbin/usermod, /usr/sbin/userdel, /usr/bin/tee, /usr/bin/grep, /bin/grep, /usr/bin/chmod, /bin/chmod, /usr/bin/echo,... (1 Reply)
Discussion started by: datkan
1 Replies
7. Solaris
Hi,
I have a small problem that I need to address regarding the password expiration for a number of different oracle accounts. Currently I have the MAXWEEKS set to 12 in the /etc/default/passwd file for all accounts. I also have sudo installed on the server and users access the oracle accounts... (2 Replies)
Discussion started by: sparcman
2 Replies
8. UNIX for Dummies Questions & Answers
Have a sudo statement inside of a here document. It prompts me for a password, but doesnt wait for me to enter my password. Is there a way I can use the command without sudo or anyway that I can enter the password correctly?
Eg :
while read remotehost
do
ssh -t $2@$remotehost ... (0 Replies)
Discussion started by: mnanavati
0 Replies
9. Shell Programming and Scripting
I am writing a BASH script to update a webserver and then restart Apache. It looks basically like this:
#!/bin/bash
rsync /path/on/local/machine/ foo.com:path/on/remote/machine/
ssh foo.com sudo /etc/init.d/apache2 reloadrsync and ssh don't prompt for a password, because I have DSA encryption... (9 Replies)
Discussion started by: fluoborate
9 Replies
10. HP-UX
I need to configure access for a user in an HP-UX to :
1) use certain commands and
2) login as another user as a sudo.
These have to be done WITHOUT the user needing to enter a password.
However, after I enter the lines using visudo, there is a prompt for a password when the user... (3 Replies)
Discussion started by: aigini82
3 Replies
LEARN ABOUT DEBIAN
dancer::fileutils
Dancer::FileUtils(3pm) User Contributed Perl Documentation Dancer::FileUtils(3pm)
NAME
Dancer::FileUtils - helper providing file utilities
SYNOPSIS
use Dancer::FileUtils qw/dirname path/;
# for 'path/to/file'
my $dir = dirname($path); # returns 'path/to'
my $path = path($path); # returns '/abs/path/to/file'
use Dancer::FileUtils qw/path read_file_content/;
my $content = read_file_content( path( 'folder', 'folder', 'file' ) );
my @content = read_file_content( path( 'folder', 'folder', 'file' ) );
use Dancer::FileUtils qw/read_glob_content set_file_mode/;
open my $fh, '<', $file or die "$!
";
set_file_mode($fh);
my @content = read_file_content($fh);
my $content = read_file_content($fh);
DESCRIPTION
Dancer::FileUtils includes a few file related utilities related that Dancer uses internally. Developers may use it instead of writing their
own file reading subroutines or using additional modules.
SUBROUTINES
/METHODS
dirname
use Dancer::FileUtils 'dirname';
my $dir = dirname($path);
Exposes File::Basename's dirname, to allow fetching a directory name from a path. On most OS, returns all but last level of file path. See
File::Basename for details.
open_file
use Dancer::FileUtils 'open_file';
my $fh = open_file('<', $file) or die $message;
Calls open and returns a filehandle. Takes in account the 'charset' setting from Dancer's configuration to open the file in the proper
encoding (or defaults to utf-8 if setting not present).
path
use Dancer::FileUtils 'path';
my $path = path( 'folder', 'folder', 'filename');
Provides comfortable path resolving, internally using File::Spec.
read_file_content
use Dancer::FileUtils 'read_file_content';
my @content = read_file_content($file);
my $content = read_file_content($file);
Returns either the content of a file (whose filename is the input), undef if the file could not be opened.
In array context it returns each line (as defined by $/) as a separate element; in scalar context returns the entire contents of the file.
read_glob_content
use Dancer::FileUtils 'read_glob_content';
open my $fh, '<', $file or die "$!
";
my @content = read_glob_content($fh);
my $content = read_glob_content($fh);
Same as read_file_content, only it accepts a file handle. Returns the content and closes the file handle.
set_file_mode
use Dancer::FileUtils 'set_file_mode';
set_file_mode($fh);
Applies charset setting from Dancer's configuration. Defaults to utf-8 if no charset setting.
EXPORT
Nothing by default. You can provide a list of subroutines to import.
AUTHOR
Alexis Sukrieh
LICENSE AND COPYRIGHT
Copyright 2009-2011 Alexis Sukrieh.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as
published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
perl v5.14.2 2012-01-27 Dancer::FileUtils(3pm)