Re: root password



Am Montag, den 20.08.2007, 23:57 -0400 schrieb Alex Janssen:
I see in the manual for su that -l yields a login environment for
root.
-i will yield an error message.
Try "sudo su -l".

Just use "sudo -i" without further arguments. From the sudo man page:

-i The -i (simulate initial login) option runs the
shell specified in the passwd(5) entry of the user
that the command is being run as. The command name
argument given to the shell begins with a - to tell
the shell to run as a login shell. sudo attempts to
change to that user’s home directory before running
the shell. It also initializes the environment,
leaving TERM unchanged, setting HOME, SHELL, USER,
LOGNAME, and PATH, and unsetting all other environ‐
ment variables. Note that because the shell to use
is determined before the sudoers file is parsed, a
runas_default setting in sudoers will specify the
user to run the shell as but will not affect which
shell is actually run.


[x] ulf

--
STRESSED spelled backwards is DESSERTS.


--
ubuntu-users mailing list
ubuntu-users@xxxxxxxxxxxxxxxx
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users


Relevant Pages

  • RE: SSH Tunneling without console login
    ... > that the command will also login onto PC2. ... > not give a shell prompt, ... I only need SSH ... > tunneling purposes, i login to the remote server ...
    (SSH)
  • Environment Poisoning and login -p
    ... login -p can be used to propagate environment flags ... in order to trojan the user shell of the target account. ... I will note that in -CURRENT, both "nologin" and /bin/sh ...
    (FreeBSD-Security)
  • Re: $PATH and /etc/profile
    ... If you run startx ... >> starting X from a login shell. ... > to detach from the console and allow you to continue working on the ... how to propery setup their shell environment. ...
    (Debian-User)
  • Re: change $PATH system-wide?
    ... Xsession script uses /bin/sh and does not know what shell you will be ... To set PATH at the graphical login you should put it in your ... environment scripts or a bug with the selected window manager. ...
    (Debian-User)
  • Re: xsession file
    ... The login managersxdm and kdm do not run a login shell, so .profile, ... In that xsession file load *the same shell* as your ...
    (Debian-User)