LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   sudo without password prompt? (https://www.linuxquestions.org/questions/linux-newbie-8/sudo-without-password-prompt-584175/)

ctroyp 09-12-2007 10:29 AM

sudo without password prompt?
 
Could anyone please explain to me how to execute 'sudo su' so that it will not prompt for a password? Looking at sudo docs, it explains that is the invoking user is the same as the target user and the passwords are the same, then it will not prompt. This is the case, but it is prompting for the password.

I can enter the password in the command shell, but when using WinSCP, it crashes because it is trying to prompt for the password. So I am essentially stuck and not able to use WinSCP to edit files.

Thanks for any help...

Tinkster 09-12-2007 01:23 PM

I can't make sense of the request... what have sudo and WinSCP
got to do with each other? And I have quite happily used WinSCP
w/ a password entry, no crashing. Maybe you have some other issue
on your WinDOHs machine?


Cheers,
Tink

ctroyp 09-12-2007 01:28 PM

Quote:

Originally Posted by Tinkster (Post 2889891)
I can't make sense of the request... what have sudo and WinSCP
got to do with each other? And I have quite happily used WinSCP
w/ a password entry, no crashing. Maybe you have some other issue
on your WinDOHs machine?


Cheers,
Tink

I use WinSCP without issue on other servers. This new server is for a job that I am working on. The administrator has set me up with a username and the ability to sudo. Using puTTy, I can sudo just fine and change files as needed. However, I do not know how to 'sudo su' in WinSCP. I cannot change or add files unless I sudo. When I run the custom command for sudo su, it crashes. Am I doing this the wrong way? Is there another way to handle this?

Thanks!

Tinkster 09-12-2007 03:19 PM

The only work-around is to copy the stuff to your users home
on that server, then ssh into it, sudo and mv them to the target
directory ... but you (and the admin) need to have a thought
about how to change that. What do you need to achieve, why do
you have to become root on the target machine, which files are
you updating?

You won't be able to utilise sudo to work with WinSCP, that's
just a completely different task domain.



Cheers,
Tink

ctroyp 09-12-2007 03:23 PM

The servers I have always work with, I have had root access without sudo. I am working on their web files and database.

Tinkster 09-12-2007 03:38 PM

OK ... and how proficient are you with Linux and its file-systems?
Maybe you should make the web-files owned by a group which your
ordinary user account belongs to, and have them (and their directory
structure) group-writable?

And for the database stuff: do you need file-level access to those?

It's just that working on a machine as root on a regular basis to
me indicates that the initial set-up is flawed.


Cheers,
Tink

ctroyp 09-12-2007 03:51 PM

Quote:

Originally Posted by Tinkster (Post 2890017)
OK ... and how proficient are you with Linux and its file-systems?
Maybe you should make the web-files owned by a group which your
ordinary user account belongs to, and have them (and their directory
structure) group-writable?

And for the database stuff: do you need file-level access to those?

It's just that working on a machine as root on a regular basis to
me indicates that the initial set-up is flawed.


Cheers,
Tink

Yeah, I guess I need to just request that they set me up with the appropriate permissions rather than trying to deal with the sudo stuff.

Thanks for the help.

Tinkster 09-12-2007 03:55 PM

Quote:

Originally Posted by ctroyp (Post 2890025)
Yeah, I guess I need to just request that they set me up with the appropriate permissions rather than trying to deal with the sudo stuff.

Thanks for the help.

Hey, no worries, and best of luck! :}


Cheers,
Tink


All times are GMT -5. The time now is 09:09 AM.