LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-01-2014, 08:22 PM   #1
ibblitzed
LQ Newbie
 
Registered: Jul 2014
Posts: 2

Rep: Reputation: Disabled
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

Last edited by ibblitzed; 07-01-2014 at 08:31 PM.
 
Old 07-01-2014, 08:34 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,272
Blog Entries: 28

Rep: Reputation: 6124Reputation: 6124Reputation: 6124Reputation: 6124Reputation: 6124Reputation: 6124Reputation: 6124Reputation: 6124Reputation: 6124Reputation: 6124Reputation: 6124
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.

Last edited by frankbell; 07-01-2014 at 08:35 PM.
 
Old 07-01-2014, 10:33 PM   #3
ibblitzed
LQ Newbie
 
Registered: Jul 2014
Posts: 2

Original Poster
Rep: Reputation: Disabled
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?
 
Old 07-01-2014, 11:49 PM   #4
linuxtinker
Member
 
Registered: Dec 2013
Location: NJ / USA
Distribution: Slackware 64 -Current
Posts: 232

Rep: Reputation: 99
did you try those as root?
 
Old 07-02-2014, 12:11 AM   #5
genss
Member
 
Registered: Nov 2013
Posts: 741

Rep: Reputation: Disabled
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

Last edited by genss; 07-02-2014 at 12:14 AM.
 
Old 07-02-2014, 08:09 AM   #6
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065
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.
 
Old 01-15-2015, 02:09 AM   #7
vtired
LQ Newbie
 
Registered: Jul 2010
Distribution: slackware 14.1
Posts: 4

Rep: Reputation: 0
Thanks tronayne

Quote:
Originally Posted by tronayne View Post
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.
 
Old 01-15-2015, 11:04 AM   #8
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065
Quote:
Originally Posted by vtired View Post
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.
 
Old 01-18-2015, 09:05 AM   #9
j_v
Member
 
Registered: Oct 2011
Distribution: Slackware64
Posts: 364

Rep: Reputation: 67
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?).
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] User not in sudoers: How to add user? Permtion Denied for sudoers file esgol Linux - Newbie 3 07-13-2012 07:44 AM
Fedora /etc/sudoers file and sudoers.d directory davejjj Linux - Newbie 2 10-21-2011 06:19 PM
I deleted /etc/sudoers and creates a new file call sudoers but now it doesnt for visu abefroman Linux - Software 1 11-10-2005 05:03 PM
noobie question about rc.d file bob cashman Ubuntu 3 07-15-2005 10:31 AM
Sudoers -- What am I missing newbie03 Linux - Newbie 3 12-30-2003 11:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration