LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-22-2016, 04:44 PM   #1
sigint-ninja
Member
 
Registered: Feb 2011
Location: Republic Of Ireland
Distribution: Debian,Centos,Slackware
Posts: 508

Rep: Reputation: 29
root user access in slackware


hi guys,

i edited my sudoers file on my slackware machine

i uncommented to allow members of group wheel to execute any command

then i added myself to group wheel using

gpasswd -a user wheel

but i cant run commands like

visudo
ifconfig
netconfig

without being root...what do i have to do?
 
Old 02-22-2016, 04:51 PM   #2
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2138Reputation: 2138Reputation: 2138Reputation: 2138Reputation: 2138Reputation: 2138Reputation: 2138Reputation: 2138Reputation: 2138Reputation: 2138Reputation: 2138
Are you putting "sudo" in front of the commands?

Also, giving your regular user unlimited password-less sudo access is a terrible idea from a security perspective.
 
Old 02-22-2016, 04:58 PM   #3
sigint-ninja
Member
 
Registered: Feb 2011
Location: Republic Of Ireland
Distribution: Debian,Centos,Slackware
Posts: 508

Original Poster
Rep: Reputation: 29
cant believe i was being so thick...no i wasnt putting sudo in front...i should know this!!!...aaaagh its been a rough day...nevermind!!!

under:
## Uncomment to allow members of group sudo to execute any command

i have:

user1 ALL=(ALL) ALL

when i sudo visudo it asks me for password but then says command not found

also,is there any consequence to belonging to wheel group...should i remove my user account from the wheel group.
from what i read wheel is just an old term for root group...is this correct?

thanks for the help...once again

Last edited by sigint-ninja; 02-22-2016 at 05:22 PM.
 
Old 02-23-2016, 07:43 AM   #4
offgridguy
Senior Member
 
Registered: Nov 2015
Location: Alberta Canada
Distribution: Windows10, Debian
Posts: 1,109

Rep: Reputation: 147Reputation: 147
Of course it's your own preference if you want to use sudo. Personally one of the things I like about Slackware is not having to use sudo for everything, I use the su - command to switch to root for admin.tasks.
 
Old 02-24-2016, 06:42 AM   #5
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (current), FreeBSD, Win10, It varies
Posts: 9,952

Rep: Reputation: 2147Reputation: 2147Reputation: 2147Reputation: 2147Reputation: 2147Reputation: 2147Reputation: 2147Reputation: 2147Reputation: 2147Reputation: 2147Reputation: 2147
did you log out and back in?

two different ways you can do this, maybe three.
common group name used for sudo permissions are,
'sudo' and 'wheel'

to find out what your system used.
Code:
cat /etc/group
then look to see which one is already there. If neither one is there you can just add a group name using groupadd [options] group using the common group name or one to your liking then set it up in your sudoers file.

Code:
## Uncomment to allow members of group wheel to execute any command
# %wheel ALL=(ALL) ALL

## Same thing but without a password
%wheel ALL=(ALL) NOPASSWD: ALL
as you should have noticed mine is using a group called wheel, and two, all them assigned to it do not have to use their's or any password at all.

So now gather the understanding that it is not the actual name (here and in certin cases, if not all) that really matters, rather it is the permissions.

where you had/or want to use
visudo
I use
#nano /etc/sudoers
where you used gpasswd -a user wheel
I used, sudo usermod -aG wheel userName
or
#usermod -aG wheel userName

# <-- indicates root user, in a frist case scenario.

Quote:
Originally Posted by sigint-ninja View Post
when i sudo visudo it asks me for password but then says command not found
you have to use su
root can only modify that. all you have to start with is a root account/user. No others with root permissions.

Last edited by BW-userx; 02-24-2016 at 07:38 AM.
 
Old 02-24-2016, 07:05 AM   #6
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (current), FreeBSD, Win10, It varies
Posts: 9,952

Rep: Reputation: 2147Reputation: 2147Reputation: 2147Reputation: 2147Reputation: 2147Reputation: 2147Reputation: 2147Reputation: 2147Reputation: 2147Reputation: 2147Reputation: 2147
Quote:
Originally Posted by offgridguy View Post
Of course it's your own preference if you want to use sudo. Personally one of the things I like about Slackware is not having to use sudo for everything, I use the su - command to switch to root for admin.tasks.
hummmm was that
Code:
su
or
su -
it matters

they both work. too, in (some) other distros that utilize sudo one can still use root user 'su' and 'su -'

if not all distro's. I will not install all of them to find out if that is a true the ones that use them just need to apply themselves to find out.

Last edited by BW-userx; 02-24-2016 at 07:16 AM.
 
Old 02-24-2016, 07:29 AM   #7
malekmustaq
Senior Member
 
Registered: Dec 2008
Location: root
Distribution: Slackware & BSD
Posts: 1,667

Rep: Reputation: 494Reputation: 494Reputation: 494Reputation: 494Reputation: 494
Quote:
Originally Posted by sigint-ninja View Post
cant believe i was being so thick...no i wasnt putting sudo in front...i should know this!!!...aaaagh its been a rough day...nevermind!!!

under:
## Uncomment to allow members of group sudo to execute any command

i have:

user1 ALL=(ALL) ALL

when i sudo visudo it asks me for password but then says command not found

also,is there any consequence to belonging to wheel group...should i remove my user account from the wheel group.
from what i read wheel is just an old term for root group...is this correct?

thanks for the help...once again
First of all what returns after giving these commands:
Code:
which sudo && which visudo
Please give us feedback.
 
Old 02-24-2016, 07:44 AM   #8
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (current), FreeBSD, Win10, It varies
Posts: 9,952

Rep: Reputation: 2147Reputation: 2147Reputation: 2147Reputation: 2147Reputation: 2147Reputation: 2147Reputation: 2147Reputation: 2147Reputation: 2147Reputation: 2147Reputation: 2147
@malekmustaq
He is using SlackWare, root is the only one he can goto to get help for his problem. That is why he is getting
Quote:
command not found
while trying to use sudo before he had root help him with his situation.

Last edited by BW-userx; 02-24-2016 at 07:46 AM.
 
  


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
How to grant root level access to non root user zaeem Linux - Server 19 03-07-2012 12:51 PM
Changed my root user access for mysql access to Any from localhost SSBN Linux - Server 2 03-14-2011 03:25 PM
[SOLVED] How to allow access to some commands having root privleges to be run bu non root user suryashikha Linux - Newbie 8 10-31-2009 02:05 PM
slackware 10.. root user only gets read only access gtan Slackware 2 09-25-2004 08:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:05 PM.

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