Skip to content

.profile created as root if it does not already exist #19

@hoyle-ub

Description

@hoyle-ub

If a user does not already have a .profile when this script is run, the file is created with owner 'root', rather than the user who ran the script. There's probably a more elegant way to fix this, but I just added:

if [[ ! -f /Users/${consoleuser}/.profile ]]; then
su -l "$consoleuser" -c "/usr/bin/touch /Users/${consoleuser}/.profile"
fi

inside the if statement that sets the shellenv for M1 users.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions