LinuxQuestions.org
Visit Jeremy's Blog.
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 12-30-2018, 07:25 AM   #1
hack3rcon
Senior Member
 
Registered: Jan 2015
Posts: 1,432

Rep: Reputation: 11
Post Work as admin without sudo.


Hello.
Is it possible to make a user like root? I mean is that when a user exist in "sudoers" file then for management task "sudo" must used but is it possible without sudo?

Thank you.
 
Old 12-30-2018, 07:44 AM   #2
jsbjsb001
Senior Member
 
Registered: Mar 2009
Location: Earth, unfortunately...
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,881

Rep: Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063
Yes

http://lmgtfy.com/?q=create+a+second+root+user+linux
 
2 members found this post helpful.
Old 12-30-2018, 07:47 AM   #3
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,564
Blog Entries: 19

Rep: Reputation: 4446Reputation: 4446Reputation: 4446Reputation: 4446Reputation: 4446Reputation: 4446Reputation: 4446Reputation: 4446Reputation: 4446Reputation: 4446Reputation: 4446
It's possible in theory. What makes root root is simply having a UID of zero. There's nothing magical about the name. And it is possible for more than one user to have the same UID.

But it would be a crazy thing to do imho and I suspect most people here would agree with me.
 
1 members found this post helpful.
Old 12-30-2018, 08:14 AM   #4
jsbjsb001
Senior Member
 
Registered: Mar 2009
Location: Earth, unfortunately...
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,881

Rep: Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063
Quote:
Originally Posted by hazel View Post
...
But it would be a crazy thing to do imho and I suspect most people here would agree with me.
And of course you are absolutely correct, but we are dealing with someone who can't even do a simple web search. So I wouldn't be too concerned. I feel sorry for the people who's servers the OP is "managing"...
 
Old 12-30-2018, 09:07 AM   #5
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: Slackware®
Posts: 13,923
Blog Entries: 44

Rep: Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158
Member Response

Hi,
To have multiple 'superusers' is living dangerously. I would even limit 'sudo' rights. One can have root privileges via 'su -' but that too can create administration nightmares. Admin should be handled by a single responsible root user so any changes can be tracked along with continuity for the systems. Injections by multiple 'root' can create mangled systems that will require someone to back things to normal.
Quote:
"Life's tough...It's even tougher if you're stupid." - John Wayne
Hope this helps.
Have fun & enjoy!
 
4 members found this post helpful.
Old 12-30-2018, 09:37 AM   #6
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,564
Blog Entries: 19

Rep: Reputation: 4446Reputation: 4446Reputation: 4446Reputation: 4446Reputation: 4446Reputation: 4446Reputation: 4446Reputation: 4446Reputation: 4446Reputation: 4446Reputation: 4446
I read once about a cracker (he called himself a "social engineer") who got into a company's server by phoning up the nightwatchman and asking him to "fix a minor problem" by entering the computer room and typing a line on the system console. It was something like:
Code:
cat >> /etc/passwd << "EOF"
newname:x:0:0::/root:/bin/sh
EOF
Of course the man was only too happy to help out.
 
Old 12-30-2018, 10:36 AM   #7
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,792

Rep: Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306
I think - but I cannot prove it - the admin user must be root and uid must be 0. So not only 0 (zero) is exceptional, but the word root too. With other words a user which has non-zero uid and its name is not root may fail sometimes, somewhere.
From the other hand using two entries with the same uid is illegal, will confuse the user management system (= the system will never know which one actually is in use).
But again, I think, I cannot really prove it.
 
Old 12-30-2018, 10:47 AM   #8
jsbjsb001
Senior Member
 
Registered: Mar 2009
Location: Earth, unfortunately...
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,881

Rep: Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063
You could still have a user that does have root permissions, it just wouldn't be the root user account itself.
 
Old 12-30-2018, 10:53 AM   #9
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,792

Rep: Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306
Quote:
Originally Posted by jsbjsb001 View Post
You could still have a user that does have root permissions, it just wouldn't be the root user account itself.
I'm sorry, but I do not really understand what does it mean.
 
Old 12-30-2018, 10:56 AM   #10
jsbjsb001
Senior Member
 
Registered: Mar 2009
Location: Earth, unfortunately...
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,881

Rep: Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063
Quote:
Originally Posted by pan64 View Post
I'm sorry, but I do not really understand what does it mean.
Sorry, I just didn't want to give the exact answer, so hopefully the OP learns to actually do web searches - yeah I know, wishful thinking on my part, but still...

Hint: you add to a user group... think what permissions that user group could have... (or what group that could be)
 
Old 12-30-2018, 12:39 PM   #11
ehartman
Senior Member
 
Registered: Jul 2007
Location: Delft, The Netherlands
Distribution: Slackware
Posts: 1,674

Rep: Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888
Quote:
Originally Posted by hazel View Post
But it would be a crazy thing to do imho and I suspect most people here would agree with me.
If they're running ubuntu (or Mint), maybe. Most other distributions do have a real superuser (even Debian) and their managers do not use sudo at all.
In fact, in the about 25 years I've been using Linux, this is the first PC I even installed (and set up) the sudo command at all, all of my previous systems never used it.

And all "professional" systems have a real administrator who knows the root passwd and normal users do NOT have sudo rights. At the university all administrative tasks to student PC's were done remotely (through a deployment agent) and NO-one could become root at all (it had a random generated password) on those systems.

As you may have noticed I'm a (retired now) system manager for Linux on a (Technical) University (Delft) and I was the one that introduced Linux in our group when PC's become powerfull enough (that was about with the 486) to replace Unix workstations.
I was the administrator of those Unix (HP and Sun) workstations before that.

So I've been following the evolution of Linux in general and Slackware in particular since the early 1990's.
 
1 members found this post helpful.
Old 12-30-2018, 12:51 PM   #12
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,564
Blog Entries: 19

Rep: Reputation: 4446Reputation: 4446Reputation: 4446Reputation: 4446Reputation: 4446Reputation: 4446Reputation: 4446Reputation: 4446Reputation: 4446Reputation: 4446Reputation: 4446
Having a single root user is traditional Unix and I have no quarrel with that. What is crazy is turning a normal user into a second root user.
 
Old 12-30-2018, 01:34 PM   #13
hrsetrdr
LQ Newbie
 
Registered: Aug 2004
Distribution: Arch Linux
Posts: 9

Rep: Reputation: 3
Quote:
Originally Posted by hack3rcon View Post
Hello.
Is it possible to make a user like root? I mean is that when a user exist in "sudoers" file then for management task "sudo" must used but is it possible without sudo?

Thank you.
Code:
sudo su
Boom, now as long as you keep the terminal open you are root....Install, delete, modify the system as you wish.
 
Old 12-30-2018, 01:58 PM   #14
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,725

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
Quote:
Originally Posted by hrsetrdr View Post
Code:
sudo su
Boom, now as long as you keep the terminal open you are root....Install, delete, modify the system as you wish.
Pretty sure the sudo part of that command is unnecessary and redundant. To become root and use the root user environment the command is simply
Code:
su -
I will add my voice to the recommendation that while it is possible to make a user with root-level privileges, it is a very bad idea to do so.

I'll ask to OP to explain why they want to do that...but I don't expect an answer...
 
2 members found this post helpful.
Old 12-30-2018, 02:02 PM   #15
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,792

Rep: Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306
yes, using sudo and su together is definitely deprecated.
 
2 members found this post helpful.
  


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
LXer: The Ultimate Sudo FAQ — To Sudo Or Not To Sudo? LXer Syndicated Linux News 13 04-13-2013 01:36 AM
sys admin vs network admin sulekha Linux - General 5 01-11-2009 05:03 AM
Sudo without having to type "sudo?" Mitch G Linux - Security 3 09-28-2006 02:16 PM
2K admin now RHEL4 admin (I have some questions) wilsryan Red Hat 5 01-30-2006 12:18 PM
User admin and N/w admin on Gnome hangs ssrini *BSD 2 07-28-2005 07:55 AM

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

All times are GMT -5. The time now is 06:02 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