LinuxQuestions.org
Help answer threads with 0 replies.
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 05-19-2017, 02:10 PM   #1
radical139
LQ Newbie
 
Registered: May 2017
Posts: 8

Rep: Reputation: Disabled
Remove root power of the common user


How to get a common user with root power? I want an ordinary user who can use the sudo command to run applications as root when I want. My current user has root power and I can not open some applications. I already took it from sudoers, root, admin, wheel. I can not even delete it.

userdel name --myuser

userdel: user name is currently used by process 1

I tried to log in as root to delete it but also without success, my priority is to take root, but if I do not, I'll exclude

i try killall -u name

Last edited by radical139; 05-19-2017 at 03:19 PM.
 
Old 05-19-2017, 02:49 PM   #2
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2.1.2 on Lenovo Thinkpad W520
Posts: 8,879

Rep: Reputation: Disabled
Quote:
Originally Posted by radical139 View Post
How to get a common user with root power?
Log in as a common user, then whenever needed type
Code:
su
and give the root password.

Last edited by Didier Spaier; 05-19-2017 at 02:50 PM.
 
Old 05-19-2017, 02:51 PM   #3
orbea
Senior Member
 
Registered: Feb 2015
Distribution: Slackware64-current
Posts: 1,687

Rep: Reputation: Disabled
I would suggest 'su -' instead so that a login shell is used.
 
1 members found this post helpful.
Old 05-19-2017, 02:57 PM   #4
radical139
LQ Newbie
 
Registered: May 2017
Posts: 8

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Didier Spaier View Post
Log in as a common user, then whenever needed type
Code:
su
and give the root password.
It's not quite what I meant, I know how to log in as root. It turns out that my user created by me has the root power and I want to strip it!
 
Old 05-19-2017, 03:01 PM   #5
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 6,078

Rep: Reputation: 3741Reputation: 3741Reputation: 3741Reputation: 3741Reputation: 3741Reputation: 3741Reputation: 3741Reputation: 3741Reputation: 3741Reputation: 3741Reputation: 3741
I'm not sure I understand your situation. So, you added a user, let's say radical139, and assuming the OS defaults were used, that user should have a UID of 1000 or higher. Is this correct so far?

When you say your user, radical139 has root powers, do you mean that user is able to use sudo?

And what do you mean you "already took it from sudoers, root, admin, wheel"?

Just for the sake of completeness, can you provide the output of the following? Replacing radical139 with your username.

Code:
grep -e ^radical139 -e ^root /etc/{passwd,sudoers}
 
Old 05-19-2017, 03:04 PM   #6
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 6,078

Rep: Reputation: 3741Reputation: 3741Reputation: 3741Reputation: 3741Reputation: 3741Reputation: 3741Reputation: 3741Reputation: 3741Reputation: 3741Reputation: 3741Reputation: 3741
Quote:
Originally Posted by radical139 View Post
It's not quite what I meant, I know how to log in as root. It turns out that my user created by me has the root power and I want to strip it!
Ok, this is making a bit more sense, but still is confusing. How did your user get root powers? Do you only mean when you use sudo or does it have root powers in other ways too? Once we know how it was given root powers, we should be able to guide you on how to remove it.
 
Old 05-19-2017, 03:04 PM   #7
radical139
LQ Newbie
 
Registered: May 2017
Posts: 8

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bassmadrigal View Post
I'm not sure I understand your situation. So, you added a user, let's say radical139, and assuming the OS defaults were used, that user should have a UID of 1000 or higher. Is this correct so far?

When you say your user, radical139 has root powers, do you mean that user is able to use sudo?

And what do you mean you "already took it from sudoers, root, admin, wheel"?

Just for the sake of completeness, can you provide the output of the following? Replacing radical139 with your username.

Code:
grep -e ^radical139 -e ^root /etc/{passwd,sudoers}
Friend, I think you already gave me the answer, I put the UID of my user as 0, the default of root, I will try to set the default. This my current user has full root power no longer needs to use sudo. I already removed it from the admin groups / root is what I meant.
 
Old 05-19-2017, 03:05 PM   #8
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 6,078

Rep: Reputation: 3741Reputation: 3741Reputation: 3741Reputation: 3741Reputation: 3741Reputation: 3741Reputation: 3741Reputation: 3741Reputation: 3741Reputation: 3741Reputation: 3741
Quote:
Originally Posted by radical139 View Post
Friend, I think you already gave me the answer, I put the UID of my user as 0, the default of root, I will try to set the default. This my current user has full root power no longer needs to use sudo. I already removed it from the admin groups / root is what I meant.
Yes, that would do it. Most permissions in Linux are based off the UID. The username presented to you is like a shortcut to that UID.

You should be able to just edit it in your /etc/passwd. I would reboot once complete... just to be safe.

Last edited by bassmadrigal; 05-19-2017 at 03:07 PM.
 
1 members found this post helpful.
Old 05-19-2017, 03:19 PM   #9
radical139
LQ Newbie
 
Registered: May 2017
Posts: 8

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bassmadrigal View Post
Yes, that would do it. Most permissions in Linux are based off the UID. The username presented to you is like a shortcut to that UID.

You should be able to just edit it in your /etc/passwd. I would reboot once complete... just to be safe.
Thanks
 
  


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
genealogy of root kits - which files do the most root kits have in common? raymor Linux - Security 4 02-29-2012 04:56 AM
LXer: Understanding the Common User LXer Syndicated Linux News 0 06-26-2007 02:31 PM
creating user account with root power linux_lover2005 Linux - Newbie 6 01-04-2007 12:51 AM
Common user and fbset utility pet_hlina Linux - Newbie 10 11-13-2006 12:18 PM

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

All times are GMT -5. The time now is 10:08 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration