Re: Nedd help with sudo



On Mar 28, 1:24 pm, Hemant Shah <s...@xxxxxxxxxxxxxxxx> wrote:
Folks,

<SNIP>
the command does not run properly because certain environment variable are
not set, these variable are set when user logs in, so I tried to use "-i"
option to simulate login, but sudo asks for password when I use "-i"
option:

user1$ sudo -i -u user2 command
Password:

How do I setup sudo so that I can use "-i" and NOPASSWD together?
<SNIP>

Why not wrap "command" in a script that sets the correct environment
variables?

.



Relevant Pages

  • logon problem
    ... Now log out and try to login as admin ... that the sudo mc command doesn't work. ... Since I can su to my admin acct., it seems to me that it ... deleting .ICEauthority had always worked for me. ...
    (Ubuntu)
  • Re: PS Re: VVDQ : Alpine on Ubuntu??
    ... I'd just to add a little more explanation about the use of sudo in Linux. ... When you install Ubuntu you create a login ID with a password. ... execute a single command with superuser privileges. ...
    (Ubuntu)
  • Re: "Bugbear" virus in Linux?
    ... Ah, but then sudo stores your password only for a minute or so, then you ... for remote ssh user login, root LAN login should be always disabled. ... What about logins through terminal server via serial console, ... I don't know if RMS has ever worked as admin, ...
    (comp.os.linux.misc)
  • Summary: No login for an admin user
    ... No login for an admin user ... One possible way is to use sudo and let the su command be let to run as ... so, no dt login, no remote login, but possible to su to the user... ...
    (SunManagers)
  • Re: Security of using sudo rather than su?
    ... One for logins, the other one after login for admin tasks. ... ...and of course you could also use ssh keys for login as mentioned before. ... So _no_ disadvantage in using sudo. ...
    (Ubuntu)