General :: Sudo For A Single Command With No Password Entry

Apr 20, 2010

I wish to allow a user to use sudo to run a single command (service app status) to determine if my application app is running, in my sudoers file i have: user ALL= /sbin/service app status I understand that there is a parameter called timestamp_timeout that will set the timeout for the 'user', but requires at least 1 entry of the root password.

I wish to allow the user to do "sudo service app status" and not have to enter the root password ever(maybe once is ok), but still make the user enter the root password for all other root activities. Is there a way to prevent the password entry for this command only and no others?

View 3 Replies


ADVERTISEMENT

Fedora :: Does Sudo Have To Ask For Password Every Single Time?

Feb 9, 2011

It seems that every time I use the 'sudo' command I have to type a password. Is there a way to get 'sudo' to remember the password at least for the current session after I use it once or something like that?

View 14 Replies View Related

General :: Creating User With Password In Single Command?

Jan 16, 2010

I'm trying to create a user john with default password 'abcdef'. I used the following command.

useradd john -p abcdef

I can't login with the password. in /etc/shadow file I can see the password in clear text format. how I can create a user along with password.

View 3 Replies View Related

General :: Specify Password For Sudo Command When Running Bg Process?

Jun 23, 2010

I'd like to start a background job using the sudo command and route its output to a file. This presents a problem because the prompt for the password doesn't work properly. It looks something like this when I try it:

Code:
Mac:server user$ sudo php crossdomain_server.php > data/crosscomain_output.txt &
[3] 30303
Mac:server user$ Password:
[3]+ Stopped sudo php crossdomain_server.php > data/crosscomain_output.txt
Mac:server user$

Basically I'm not properly prompted for the password and as soon as I type anything in my background job fails because it didn't receive the password. Is there any way to execute a sudo command by supplying the password on the same line as the command?

View 9 Replies View Related

General :: Sudo And Command Line - Get The Result Without Having To Supply A Password

Mar 31, 2011

I have the following commande /sbin/fuser -f -u /u/DT01/F010107 1>/tmp/null 2>/tmp/seausr.T0069 when executing as root 'su' this give me all user using the file. but when tried with 'sudo' i am asked with 'user password'. Is ther anyway to simply get the result without having to supply a password and to see all user not only me. (i have the file open also).

View 1 Replies View Related

General :: Sudo Command Occasionally Asks For Root Password?

Sep 9, 2010

In Ubuntu 10.04, I logged in as user1 and when I open a new terminal and issue any command it is asking password.user@ubun-laptop:~$ sudo ifconfig[sudo] password for user: It is asking for password only for first time.From the next command onwards it is not asking.Can some one please tell me if it is possible to issue ONLY ONE COMMAND, in which even if the password request comes, it will automatically fill the password.Just like "ps -elf | grep NetworkManager". I am expecting any combination of commands in a single line, so that password is filled automatically IF PASSWORD IS ASKED. If password is not asked, the command must be executed.

View 17 Replies View Related

Red Hat / Fedora :: Set Password In Single Command?

Dec 1, 2010

Can we set password for linux board's in non-interactive mode.I didn't find suitable option for this in man page.

View 1 Replies View Related

Ubuntu :: Bypass Password For A Sudo Command?

Apr 3, 2011

I have to enter the root password every time I want to run

Code:
sudo vpnc
and I know that there is a way to avoid entering password every time but I can't remember what it is.

View 9 Replies View Related

Ubuntu :: Sudo Command Doesn't Recognize My Password?

Jun 18, 2010

This is a new installation.My system login password is recognized and that same passwd is recognized by the Software Centre, but not with sudo in the terminal.

View 2 Replies View Related

General :: Sudo Cd /root Gives Sudo - Cd - Command Not Found

Jan 6, 2011

Kernel 2.6.21.5, Slackware 12.0

Code:

Code:

On the other hand

Code:

So, I do not understand why the notification "sudo: cd: command not found", considering cd is a bash built-in command.

View 3 Replies View Related

Fedora :: Terminal Won't Let Enter Password After Enter Sudo Command ?

Jan 12, 2011

I am pasting sudo commands without problems as a user (ales in my case) and then immediately the ask the user password.

The keyboard seems to be dead, no keys work, not allowing me to enter the password.

View 6 Replies View Related

General :: Sudo No Password

May 23, 2011

I have an old server running RHEL 5.5 and I normally just type sudo nothing else and I'm instantly root. I copied my sudoers file from here to a new server but it seems not to work cause I type sudo and it ask for usage. Is something else besides the sudoers file that prevents me from logging in with sudo only.

View 5 Replies View Related

General :: How To Get Sudo Password?

Apr 28, 2011

how to get sudo password? login not working for password

View 10 Replies View Related

General :: SCP - Username And Password In Single Statement

Sep 13, 2010

I am trying to create a "GUI File Transfer " Application , for transferring the files within the network. For That I will obtain User name, Password through the GUI, I will have to append username and password in a single line and run it . I am facing difficulties in exploring the "command",

View 4 Replies View Related

General :: Safer No Password Sudo?

Nov 22, 2010

This is on my host machine. I'm the only one using it so it's fairly safe, but I have a very complex password that is hard to type over and over. I use the console for moving files around and executing arbitrary commands a LOT, and I switch terminals, so sudo remembering for the console isn't enough (AND I still have to type in my terrible password at least once!) In the past I have used the NOPASSWD trick in sudoers but I've decided to be more secure. Is there any sort of compromise besides allowing no password access to certain apps? (which can still be insecure) Something that will stop malware and remote logins from sudo rm -rf /-ing me, but in my terminals I can type happily away? Can I have this per terminal, perhaps, so just random commands won't make it through? I've tried running the terminal emulations as sudo, but that puts me as root.

View 6 Replies View Related

General :: Sudo With Seprate Password

Oct 7, 2010

Is there a way I can setup sudo with a seprate password other than root and the user password and yet I need it to pull the password from the passwd file. Ok here is why they are wanting to tie the sudo password into cyberark appliance that manages the passwords. So when the user needs to run a root command they would check out a password from cyberark. cyberark changes password from in the password file. So to restate myself is there a way to set sudo up to pull its own password from the password file and not the users or root.

View 3 Replies View Related

General :: Sudo Password Incorrect

Apr 19, 2010

I have set up a new account, with a user name of Benjamin.However, when running a sudo command, while logged in with the user name 'Benjamin', I receive an incorrect password error.Yes, I am entering the password for user name 'Benjamin' and not that of the root account.

View 9 Replies View Related

General :: Sudo - Run All Commands With Password?

Feb 16, 2010

Having a problem with sudo. I'm down as a user who can run all commands as root provided I enter my password. The relevant line from my /etc/sudoers file :

Code:

user1 ALL=(ALL) ALL

There are several commands that I run quite frequently such as mount and fdisk but would like to avoid having to enter a password each time I use them. What would be the appropriate change to the sudoers file ?

UPDATE: I neglected to scroll down to the bottom of the /etc/sudoers file where there was the line :

Code:

%admin ALL=(ALL) ALL

and since user1 was a member of the admin group any predeeding lines were being overidden by this. Commenting out this line and adding

Code:

user1 ALL= NOPASSWD: /bin/mount, /sbin/fdisk

View 1 Replies View Related

General :: Enable One User To `sudo` Without A Password?

Jun 4, 2010

How can a user be setup to sudo (or su -) without entering a password?

View 1 Replies View Related

General :: Make Sudo Ask For The Root Password?

Jul 9, 2010

When I run sudo as a normal unprivileged user, it asks for my password, not the root password. That's often convenient, but it reduces the amount of information someone would have to have in order to run commands as root. So how can I make sudo ask for the root password instead of the invoking user's password? I know it'd be done with a line in /etc/sudoers, but I can never seem to properly parse the BNF grammar in the man page to figure out exactly what to write.

View 4 Replies View Related

General :: Sudo Su Runs Without Password Prompt?

May 25, 2011

So here's the problem. We've got the /etc/sudoers file set up so that users can run commands from /bin like "cat" or "mkdir" without entering a password. The problem is that the "su" command is also in /bin, so if they enter "sudo su", it gives them root access without a password. Here's the /etc/sudoers file:

Defaults targetpw
%users ALL=(ALL) ALL
root ALL=(ALL) ALL
support ALL=(ALL) NOPASSWD: /sbin/, /bin/, /opt/, /etc/init.d/, /elo/
support ALL=(ALL) NOPASSWD: /usr/bin/mysql

Is there a way I can deny /bin/su while still allowing the rest of the /bin commands?

View 1 Replies View Related

General :: Mail Server : Reset The Password For It Using The Password Command From The Root Login?

Jul 23, 2009

I am an absolute Linux Beginner who is being required to do a bit of admin work because the boss just fired the old linux admin. Unfortunately, one of our employees cannot remember her password to her email account and as such I need to reset it on our linux server.What I want to check is that this email account is actually a linux user account and I simply will reset the password for it using the passwd command from the root login. Is that correct?

View 1 Replies View Related

Ubuntu :: Sudo And Login Password Recognized - Password Box Does Not Like

Apr 27, 2010

I needed to use Synaptic Package Manager to install an app, but the dialog box ("enter the Administrative Password") that pops up before you can use Synaptic doesn't recognize my password ("incorrect password). I tried typing it into a text editor and it's spelled right, caps lock not turned on or anything.

In Terminal, sudo recognizes it, and it is recognized when I log into Ubuntu. I'm the sole user, I have admin privileges, I've been doing admin things.

I just now did System > Administration > Users and Groups and got a dialog box saying

"Failed to contact configuration server; some possible causes are that you need to enable TCP/IP networking for ORBit, or you have stale NFS locks due to a system crash. See [URL] for information. (Details - 1: Server ping error: IDLmg.org/CORBA/COMM_FAILURE:1.0)"

Moving past that, I changed my user password, and Ubuntu authenticated it.

How do you launch Synaptic Package Manager from the command line?

View 4 Replies View Related

General :: No Prompt For Root Password After Attempting To Enter Single User Mode?

Jul 13, 2011

I followed instructions to enter single user mode by adding single at the end of kernel line but after that it doesn't ask for root password but brings up the sh# prompt. Isn't that supposed to be insecure? I understand for this the grub password can be applied but even after adding "single" it should ask for root password..or it should not..??

View 3 Replies View Related

General :: How To Alias A Command For Sudo

Sep 25, 2010

I have an alias that I would like to use both as a regular user and as root, via sudo. Specifically, it is this:

alias rm=trash This works fine as a normal user, and it works fine when I use sudo -i to get a root shell prompt, but if I use sudo rm, the alias does not apply. So where do I need to put my alias so that it works in one-off sudo commands?

View 1 Replies View Related

General :: Execute A Command After Sudo?

May 4, 2011

I am working in a CentOS environment with numerous CentOS machines. Currently there are multiple developers that each have their own login/home directory and then for various admin tasks we all share a single super user account.

The problem

I have a number of aliases, variables, functions, and settings that exist in my personal login's .bash_profile. None of these are available in the shared super user's .bash_profile. My current work around is that everytime I sudo in as the super user and I re-execute my .bash_profile from my personal user's home directory. I am not allowed to edit the init stuff for the super user

The Question

Is there any way I can automate my sudo sequence such that it will execute my personal .bash_profile after I've executed sudo without requiring me to edit the super user's bash init stuff?

View 3 Replies View Related

Ubuntu :: Login Password To Be Different Then SUDO Password?

Jun 25, 2010

Is it possible to have your login password t be different then your SUDO password. I did a search on sudo password- Almost every post has the term in it.

View 2 Replies View Related

General :: Write A Script To Sudo The Last Command?

Feb 19, 2011

for some commands such as apt-get install xxx, I forget to add sudo first, then I need to retype it. What I want is in such cases, I just type a simple command, for example resudo. It will sudo my last command sudo apt-get install xxx. Is it possible in bash?

View 1 Replies View Related

General :: Run Ubuntu Command Sudo Apt-get In Mandriva?

Sep 12, 2011

How i can run the following command (for Ubuntu) in Mandriva 2005 ? What is the similar command ?

sudo apt-get install python-wxgtk2.8 pyro mercurial build-essential bison flex mercurial python-numpy

View 1 Replies View Related

General :: Execute Root Command Without Sudo?

Jan 24, 2010

On my ubuntu I have a command pm-suspend, which puts the computer to sleep. It has to be run with sudo. Since it is inconvenient to be forced to type the password every time I want my computer to sleep, I thought maybe there's a way around it. Naively I thought that if I'd create a script as root, that invokes pm-suspend, and then let anyone execute that script, I could run that script as my own user and then that script would be considered run by root and hence be allowed to run pm-suspend. Obviously that didn't work. The root-check procedure in pm-suspend still found out that the original executor was someone different from root.

Still I think something similar (although slightly more elaborate) should work.I'm thinking about the process that allows the user to mount hard drives for example. Normally root is required, but it is somehow bypassed by the gnome utility mounting.

View 8 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved