LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Noobie, missing sudoers file in 14.1 (https://www.linuxquestions.org/questions/slackware-14/noobie-missing-sudoers-file-in-14-1-a-4175509813/)

ibblitzed 07-01-2014 08:22 PM

Noobie, missing sudoers file in 14.1
 
so I'm just coming back to linux after a while of not using it, and just installed slackware 14.1 and trying to add my account (msu) to the sudoers file but i can't find the file, where can i find it? and how can i add msu to it??
i know its usually in /etc but even when i do a where is command i can't find it
Thank you

frankbell 07-01-2014 08:34 PM

The proper way to edit sudoers is to use visudo as root in a terminal. It incorporates certain protections against breaking the file.

See man visudo for more.

Whereis is for locating binary files. You might have had better luck with the locate command.

ibblitzed 07-01-2014 10:33 PM

something must be install incorrectly because these are the results from those commands and i always remembered "man"

bash-4.2# man visudo
bash: man: command not found
bash-4.2# locate sudoers
locate: fatal error: Could not find user database '/var/lib/slocate/slocate.db': No such file or directory

any ideas?

linuxtinker 07-01-2014 11:49 PM

did you try those as root?

genss 07-02-2014 12:11 AM

man is a part of the "ap"... cluster of packages
sudo is also a part of that

make sure you have that series installed, as it contains many useful basic stuff

PS locate updates it's database with "updatedb" (it should be ran in cron, at least it used to)
you can use the find command if you don't want to update the whole database

tronayne 07-02-2014 08:09 AM

To use locate, you first need to build the data base as root with slocate; this is done once on a new installation:
Code:

su -
<root password>
slocate -u
<wait a while>
Ctl-D or exit

After that, all user will be able to locate files and directories with locate (and the data base will be kept up-to-date automagically).

Hope this helps some.

vtired 01-15-2015 02:09 AM

Thanks tronayne
 
Quote:

Originally Posted by tronayne (Post 5197309)
To use locate, you first need to build the data base as root with slocate; this is done once on a new installation:
Code:

su -
<root password>
slocate -u
<wait a while>
Ctl-D or exit

After that, all user will be able to locate files and directories with locate (and the data base will be kept up-to-date automagically).

Hope this helps some.

I could not get locate command to work in my system, slack 14.1. This has helped me. Thanks.

tronayne 01-15-2015 11:04 AM

Quote:

Originally Posted by vtired (Post 5301177)
I could not get locate command to work in my system, slack 14.1. This has helped me. Thanks.

You're welcome -- glad to know it helped.

j_v 01-18-2015 09:05 AM

Just a guess, based on op's response: sounds like two possible problems could be PATH environment variable getting hosed and/or mount issues (e.g /usr and /var not mounted?).


All times are GMT -5. The time now is 09:17 PM.