I have created a user.
useradd -M -d /usr/my_user my_user
chown -R my_user. /usr/my_user
Now as a root I can type:
su - my_user -c /usr/my_user/some_dir/script.sh
but if I want to do more complicated things, for example navigate between **my_user** folders I have to type the su - my_user pattern every time. Otherwise it states that I do not have permissions.
How can I make my life easier and not type the
su
every time?
Asked by carpenter
(1241 rep)
Oct 5, 2016, 06:36 PM
Last activity: Oct 1, 2023, 12:15 PM
Last activity: Oct 1, 2023, 12:15 PM