C
C
Chvalov2019-09-20 22:28:33
bash
Chvalov, 2019-09-20 22:28:33

Variables set in /etc/profile.d/xxx.sh are not visible to root, how to treat?

I set variables in /etc/profile.d/xxx.shso that the programs are available to all users, however, when executed, it sudo название-софтаwrites that it does not know about such software, without sudoeverything works fine
Use symbolic links in /usr/bin, an option, but not convenient, you will have to create a lot of links, and at any time when updating software may be added or removed.
Where can variables be moved so that they are also available from root, and so that when updating the OS, you do not have to add a new one

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Saboteur, 2019-09-20
@Chvalov

try turning on the -i option to simulate login as a user, with loading profiles
sudo -i .....

S
SOTVM, 2019-09-21
@sotvm

be in the sudo group,
add it to /etc/sudoers (so that moss does not pop up when entering the password
%sudo ALL=(ALL) NOPASSWD:AL
better through vi or nano
, I edit through Geany or the Double Commander editor (there were no problems

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question