Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
hi group,
I get frustrated by the need for root access on common commands like:
mount
umount
gparted
apt-get
yum
etc
I currently use .alias file to provide the sudo prefix to these commands. I have my sudoers file set up with NOPASSWD.
My question is, is there an easier way other than an entry for each command in the .alias file? I get so frustrated that I often run as root which is not wise. Can I set up 'CTRL-Enter' to prefix the sudo?
Even if there is a way to do this, I wouldn't suggest it, and I would suggest removing the alias as well. The need to preface a command with sudo or perform it as root is very helpful as a reminder that you can royally screw up your system if you use that tool the wrong way. That's WHY you need root permissions in order to run it in the first place. Making root-level commands easier to use without thinking about it also has the side effect of making the user less careful/responsible with those tools.
Last edited by suicidaleggroll; 08-23-2015 at 03:57 PM.
unfortunately you are using ubuntu
there is NO root account any more so you really can not login as root
as i do with Debian8
Code:
su -
---- type in the ROOT!!!!! password when asked ----
apt-get update
apt-get upgrade
" su - " is a shortcut for " su -l root "
???
yum
???
How are you using yum on a debian bassed OS
yum is a redhat package manager
"su " and "su - " and "sudo" are the normal ways to become root
but the os has to have a root user and not the first non root user being given root power
user 500 or 1000 and not user 501 and 1001
Distribution: K/Ubuntu 18.04-14.04, Scientific Linux 6.3-6.4, Android-x86, Pretty much all distros at one point...
Posts: 1,802
Rep:
It is a security problem to have an "active" root account (specifically, one that can be logged onto graphically or remotely). It's a bad idea. I had issues with it too, when first transitioning from Mandrake (yes, Mandrake, before Mandriva, or any of the multitude of financial issues that distro faced)... But, I got used to it...
It is a security problem to have an "active" root account (specifically, one that can be logged onto graphically or remotely). It's a bad idea.
You're right, which is why Ubuntu's security policy is so ridiculous. It simply disables the real root account, and forces the first created user to become "root" instead. So now instead of having a real root account with a strong password that you can't log into graphically and can't ssh into (most distros disable root ssh access by default), you have an account that for all intents and purposes is root, yet it uses a traditionally weak user password AND it has full ssh functionality AND you log into it graphically every day. It IS a bad idea, and it's something Ubuntu forces you into with, as frankbell so elequently put it, their weird sudo fetish.
And to top it all off, if you post how to disable this asinine policy, re-enable the real root account, and strip your user of its unlimited sudo access, you'll be banned from the Ubuntu support forums. Just one of the many reasons I refuse to use Ubuntu.
Last edited by suicidaleggroll; 08-24-2015 at 11:00 AM.
You could also "sudo passwd -d root && sudo passwd root && su"
to get a normal root in ubuntu, but I wouldn't recommend it. As I haven't a clue of how to UNDO that. And there's probably reasons why ubuntu took the effort to do what they do.
I suppose you could modify the keymap and have a key that types "sudo " when you hit it. But sudo -s is okay for me as I normally have multiple xterms open and one is basically always root. Just be mindful of physical security when operating like that. And make the root xterm unique with different color schemes and/or $PS1 attributes that are more noticeable than $ vs. #.
hi group,
I get frustrated by the need for root access on common commands like:
mount
umount
gparted
apt-get
yum
etc
Hi, mount and umount could be solved by addin the 'user' option to the desired mount points in fstab.
As for running as root : you'll burn yourself quite a few times, I know I did...
You could also "sudo passwd -d root && sudo passwd root && su"
to get a normal root in ubuntu, but I wouldn't recommend it. As I haven't a clue of how to UNDO that. And there's probably reasons why ubuntu took the effort to do what they do.
As far as I know, giving root a password should make it a normal root account. I suppose to undo it, you would have to give root a password that can't be typed in.
I don't like sudo. If someone gets the user's password, they also have root access.
As far as I know, giving root a password should make it a normal root account. I suppose to undo it, you would have to give root a password that can't be typed in.
I don't like sudo. If someone gets the user's password, they also have root access.
You can have more than one user. And you don't have to have easy passwords on any of them. The root password is sometimes easier to guess than users passwords. Since it's likely the same across multiple machines. Plus comes with a default password in many distros and embedded firmware. And you already know that the username is root.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.