visudo + read access to file from non root user
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
how to access the file by visudo
from non root user
for example
when we change user to hdfs
and from user hdfs
we want to print the file file.cfg
we get Permission denied
how to configure the visudo
in order to get read access from user hdfs
# su hdfs
$ whoami
hdfs
$ pwd
/opt/home/security
$ cat file.cfg
cat: sec.cfg: Permission denied
$ ls -ltr
-rwxr-----. 1 root root sec.cfg
expected output
# su hdfs
$ pwd
/opt/home/security
cat file.cfg
app_q 384273462 pass BHYVF^GTYR&GV@yhgb2yr
linux permissions rhel sudo
add a comment |Â
up vote
0
down vote
favorite
how to access the file by visudo
from non root user
for example
when we change user to hdfs
and from user hdfs
we want to print the file file.cfg
we get Permission denied
how to configure the visudo
in order to get read access from user hdfs
# su hdfs
$ whoami
hdfs
$ pwd
/opt/home/security
$ cat file.cfg
cat: sec.cfg: Permission denied
$ ls -ltr
-rwxr-----. 1 root root sec.cfg
expected output
# su hdfs
$ pwd
/opt/home/security
cat file.cfg
app_q 384273462 pass BHYVF^GTYR&GV@yhgb2yr
linux permissions rhel sudo
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
how to access the file by visudo
from non root user
for example
when we change user to hdfs
and from user hdfs
we want to print the file file.cfg
we get Permission denied
how to configure the visudo
in order to get read access from user hdfs
# su hdfs
$ whoami
hdfs
$ pwd
/opt/home/security
$ cat file.cfg
cat: sec.cfg: Permission denied
$ ls -ltr
-rwxr-----. 1 root root sec.cfg
expected output
# su hdfs
$ pwd
/opt/home/security
cat file.cfg
app_q 384273462 pass BHYVF^GTYR&GV@yhgb2yr
linux permissions rhel sudo
how to access the file by visudo
from non root user
for example
when we change user to hdfs
and from user hdfs
we want to print the file file.cfg
we get Permission denied
how to configure the visudo
in order to get read access from user hdfs
# su hdfs
$ whoami
hdfs
$ pwd
/opt/home/security
$ cat file.cfg
cat: sec.cfg: Permission denied
$ ls -ltr
-rwxr-----. 1 root root sec.cfg
expected output
# su hdfs
$ pwd
/opt/home/security
cat file.cfg
app_q 384273462 pass BHYVF^GTYR&GV@yhgb2yr
linux permissions rhel sudo
edited Oct 29 '17 at 12:18
Hauke Laging
53.6k1282130
53.6k1282130
asked Oct 29 '17 at 8:58
yael
2,0251145
2,0251145
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
1
down vote
You need e.g. this line in the sudo
configuration:
hdfs ALL=(ALL) NOPASSWD: /bin/cat /opt/home/security/file.cfg
and then run these commands:
su hdfs
sudo /bin/cat /opt/home/security/file.cfg
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
You need e.g. this line in the sudo
configuration:
hdfs ALL=(ALL) NOPASSWD: /bin/cat /opt/home/security/file.cfg
and then run these commands:
su hdfs
sudo /bin/cat /opt/home/security/file.cfg
add a comment |Â
up vote
1
down vote
You need e.g. this line in the sudo
configuration:
hdfs ALL=(ALL) NOPASSWD: /bin/cat /opt/home/security/file.cfg
and then run these commands:
su hdfs
sudo /bin/cat /opt/home/security/file.cfg
add a comment |Â
up vote
1
down vote
up vote
1
down vote
You need e.g. this line in the sudo
configuration:
hdfs ALL=(ALL) NOPASSWD: /bin/cat /opt/home/security/file.cfg
and then run these commands:
su hdfs
sudo /bin/cat /opt/home/security/file.cfg
You need e.g. this line in the sudo
configuration:
hdfs ALL=(ALL) NOPASSWD: /bin/cat /opt/home/security/file.cfg
and then run these commands:
su hdfs
sudo /bin/cat /opt/home/security/file.cfg
answered Oct 29 '17 at 12:24
Hauke Laging
53.6k1282130
53.6k1282130
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f401175%2fvisudo-read-access-to-file-from-non-root-user%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password