Skip to content

Commit c15b9b3

Browse files
committed
Sets custom home directory for new users
Updates user creation to specify a fixed home directory at /home/sof. Ensures consistency in user home directories for better organization. Signed-off-by: Christopher Turner <christopher.g.turner@intel.com>
1 parent 23d7f6a commit c15b9b3

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

scripts/sudo-cwd.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ exec_as_cwd_uid()
4949
getent group "$cwd_guid" ||
5050
sudo groupadd -g "$cwd_guid" 'cwd_group'
5151

52-
sudo useradd -m -u "$cwd_uid" -g "$cwd_guid" "$cwd_user"
52+
# Always set home directory to /home/sof for the new user
53+
sudo useradd -m -u "$cwd_uid" -g "$cwd_guid" -d /home/sof "$cwd_user"
5354

5455
# Add cwd_user to the sof group for group write access
5556
sudo usermod -aG sof "$cwd_user"

0 commit comments

Comments
 (0)