sysadmin user not using bash shell
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
StarlingX |
Fix Released
|
Low
|
Jim Gauld |
Bug Description
Brief Description
-----------------
sysadmin user is configured with /bin/sh and not /bin/bash . This is inconsistent with 'root'.
This has unintentional side effects with in-line scripting and bash-completion doesn't work.
i.e., enter a command like, "kubectl desc<tab>" and hitting the tab repeatedly completes the command and so on, this dramatically improves user interactive experience.
Many users may not notice the difference.
Current configuration of sysadmin user has /bin/sh .
grep -e sysadmin -e root /etc/passwd
root:x:
sysadmin:
The sysadmin user is added via the following code:
./stx/config-
%pre
getent group sys_protected >/dev/null || groupadd -f -g 345 sys_protected
getent passwd sysadmin > /dev/null || \
useradd -m -g sys_protected -G root \
-d /home/sysadmin -p %{SYSADMIN_P} \
-s /bin/sh sysadmin 2> /dev/null || :
Severity
--------
Minor: System is usable, with minor issue.
Steps to Reproduce
------------------
Install lab. Login as sysadmin.
echo $SHELL
Expected Behavior
------------------
login as sysadmin.
echo $SHELL
/bin/bash
bash-completion of kubectl commands work.
Actual Behavior
----------------
echo $SHELL
/bin/sh
bash-completion of kubectl commands don't work.
Reproducibility
---------------
100%, but some designers have seen bash-completion work sometimes on HW.
System Configuration
-------
AIO-SX. This affects all systems.
Branch/Pull Time/Commit
-------
NA.
Last Pass
---------
NA. Day one config.
Timestamp/Logs
--------------
NA.
Test Activity
-------------
Developer Testing of kubernetes upgrade.
Workaround
----------
Manually enter bash shell.
bash
Modify /etc/passwd 'sysadmin' user to use /bin/bash.
Changed in starlingx: | |
assignee: | nobody → Jim Gauld (jgauld) |
information type: | Private Security → Private |
information type: | Private → Public |
Changed in starlingx: | |
importance: | Undecided → Low |
status: | New → Triaged |
tags: | added: stx.7.0 stx.containers |
tags: | removed: stx.7.0 |
tags: | added: stx.7.0 |
Modifying sudo-config.spec only fixes initial install of the ISO.
There is something still that overrides this configuration, TBD.