[Bug 2928] New: Add a --norc option to pass to shells which support a --norc option
bugzilla-daemon at bugzilla.mindrot.org
bugzilla-daemon at bugzilla.mindrot.org
Fri Nov 9 08:12:42 AEDT 2018
https://bugzilla.mindrot.org/show_bug.cgi?id=2928
Bug ID: 2928
Summary: Add a --norc option to pass to shells which support a
--norc option
Product: Portable OpenSSH
Version: -current
Hardware: All
OS: Linux
Status: NEW
Severity: enhancement
Priority: P5
Component: ssh
Assignee: unassigned-bugs at mindrot.org
Reporter: aviso at rockhopper.net
The goal with this would be to allow syntax such as this:
ssh --norc serverA best_command_ever
With shells that support it, like BASH, this prevents ~/.bashrc from
being sourced.
Shells would have to have some sort of table to determine the option
this corresponds to.
bash: --norc
ksh: --norc
zsh: --no-rcs
csh: -f
Background:
While there may be other use cases, my use case is for environments
utilizing Kerberos for NFS home directories and authentication. The use
can use Kerberos to log onto a system without entering a password, but
does not access to their home directory without running kinit. When
using a login shell, the user can be prompted for their password if
they do not have a valid TGT. When running a command over a remote
shell, the home directory is not used, but rc/startup files may still
be sourced. In the case or bash, an attempt is always made to source
~/.bashrc unless the --norc or --rcfile options are given. This does
not prevent running the command, but result in an error message "bash:
/home/user1/.bashrc: Permission denied"
Other use cases I've seen searching the Internet were mostly related to
suppressing erroring or undesired code with .bashrc.
Related issues:
This would not prevent the error "Could not chdir to home directory
/home/user1: Permission denied" when no home directory is present.
Perhaps a --no-home option that implies --norc would help with that?
--
You are receiving this mail because:
You are watching the assignee of the bug.
More information about the openssh-bugs
mailing list