View Issue Details

IDProjectCategoryView StatusLast Update
0007867Kali Linux[All Projects] General Bugpublic2022-08-19 15:00
ReporterPlatform2265 Assigned ToGamb1t  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version2022.3 
Target VersionFixed in Version2022.3 
Summary0007867: Error "-bash: .: filename argument required" on WSL due to typo in /etc/profile
DescriptionWhen opening Kali on WSL, a two-line error prints before the login prompt:

-bash: .: filename argument required
.: usage: . filename [arguments]

The error might repeat multiple times depending on the number of files /etc/profile.d. The problem is due to a for loop at the end of /etc/profile. I think the loop was supposed to use a variable, since you see it unset 'i' even though 'i' is never declared.

Original:
if [ -d /etc/profile.d ]; then
  for i in /etc/profile.d/*.sh; do
    if [ -r ]; then
      .
    fi
  done
  unset i
fi


Fixed:
if [ -d /etc/profile.d ]; then
  for i in /etc/profile.d/*.sh; do
    if [ -r $i ]; then
      . $i
    fi
  done
  unset i
fi
Steps To ReproduceOpen Kali on WSL. The error is printed before the login prompt.

Activities

Gamb1t

2022-08-19 15:00

manager   ~0016612

This is fixed in a recent update to WSL

Issue History

Date Modified Username Field Change
2022-08-15 15:45 Platform2265 New Issue
2022-08-19 15:00 Gamb1t Assigned To => Gamb1t
2022-08-19 15:00 Gamb1t Status new => closed
2022-08-19 15:00 Gamb1t Resolution open => fixed
2022-08-19 15:00 Gamb1t Fixed in Version => 2022.3
2022-08-19 15:00 Gamb1t Note Added: 0016612