LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 06-22-2020, 10:41 PM   #1
aboka
LQ Newbie
 
Registered: Jun 2020
Posts: 26

Rep: Reputation: Disabled
Newbie Ubuntu user management questions


hi, im new to Linux and currently running Ubuntu 20.04 LTS on a vps. Like to ask some question rgd the correct way to user management -

1) is it a good practice(security reason) to first create a (regular)user with sudo right and disable root login when system is first setup?

2) will that cause any issue in later days like in Windows some program will not run unless its run as Administrator?

3) will changing the name of the root account(root) be more safe? to prevent bruteforcing password with 'root'. but heard that is not a good idea as it will break something in the system

thank you,
 
Old 06-22-2020, 11:42 PM   #2
agillator
Member
 
Registered: Aug 2016
Distribution: Mint 19.1
Posts: 419

Rep: Reputation: Disabled
My opinions: Unless you absolutely need it do not allow root login. There are only a couple of esoteric times you need it. If you run into one of those do what you have to do and then immediately disable it. Yes, immediately after installation give your primary user sudo privileges. Make sure that user has a strong password. 99.999% of programs that need administrator privileges will run with sudo and should be run with sudo and not with root. If root doesn't have a password it can't be brute forced, right?
 
Old 06-22-2020, 11:46 PM   #3
fido_dogstoyevsky
Member
 
Registered: Feb 2015
Location: Victoria, Australia
Distribution: Slackware 15
Posts: 490
Blog Entries: 2

Rep: Reputation: 576Reputation: 576Reputation: 576Reputation: 576Reputation: 576Reputation: 576
Quote:
Originally Posted by aboka View Post
...

1) is it a good practice(security reason) to first create a (regular)user with sudo right and disable root login when system is first setup?

2) will that cause any issue in later days like in Windows some program will not run unless its run as Administrator?

3) will changing the name of the root account(root) be more safe? to prevent bruteforcing password with 'root'. but heard that is not a good idea as it will break something in the system...
Hi and welcome.

1) Maybe. You'll get different opinions from different users. It is the "standard" way for Ubuntu, so maybe sticking with this until you get more experienced is a good idea.

2) No it won't, that's what sudo is for.

3) You'll need to choose a secure password. For your sudo user as well - sudo gives them the ability to harm your system. When I'm concerned about brute force attempts at passwords, I use a long passphrase (with spelling mistakes, alternate words in different languages etc).
 
Old 06-22-2020, 11:59 PM   #4
aboka
LQ Newbie
 
Registered: Jun 2020
Posts: 26

Original Poster
Rep: Reputation: Disabled
hi guys, thanks for the suggestion. i think i will go ahead and create a new user and disable the root. beside more secure, could learn something new.

but before i jump into it, would like to confirm this 2 points -

1) the vps is already setup with vpn, nginx and letsencrypt cert. doing this now wont break anything right?

2) forget to mention - i will be using ssh key authentication to login using Putty - will set it up after all is set and done. so all ok with disabling the root? scare that i might get lockout if do something wrong

p/s - according to this webpage, we hvto create '.ssl' for each user else they would not be able to login(if password login is disabled). can anyone confirms that? - https://unix.stackexchange.com/quest...ed-with-a-user

cheers,

Last edited by aboka; 06-23-2020 at 12:48 AM.
 
Old 06-23-2020, 02:04 AM   #5
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by aboka View Post
1) is it a good practice(security reason) to first create a (regular)user with sudo right and disable root login when system is first setup?
YES!
Quote:
2) will that cause any issue in later days like in Windows some program will not run unless its run as Administrator?
No. Most Linux systems expect it to be that way anyhow.

Quote:
3) will changing the name of the root account(root) be more safe? to prevent bruteforcing password with 'root'. but heard that is not a good idea as it will break something in the system
Changing the name of root? NO!!!
Don't do that. Instead disable remote root login completely (ssh).
 
Old 06-23-2020, 09:39 AM   #6
aboka
LQ Newbie
 
Registered: Jun 2020
Posts: 26

Original Poster
Rep: Reputation: Disabled
hi guys, reporting back - hv setup another vps for this test as dont want to risk doing something wrong on the running server. hv successfully done all the listed things above - create user, add sudo, disable root, add ssh keys. thank you

cheers,
 
  


Reply



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
Two questions relate to user management ICO SUSE / openSUSE 2 09-16-2005 08:21 AM
Newbie - Power Management Questions kalvadar Linux - Laptop and Netbook 1 02-08-2005 04:41 PM
Questions Questions Questions extremebfn Linux - Networking 6 09-03-2004 12:15 AM
Questions, Questions, Questions Nappa Slackware 6 11-18-2003 02:56 PM
questions,questions,questions harddrive37 Linux - Networking 1 07-21-2003 10:21 PM

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

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