It is currently Sun Mar 26, 2017 5:27 am



Welcome
Welcome to antiX-forum.

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. Registration is fast, simple, and absolutely free, so please, join our community today!


Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: unable to log in as root
PostPosted: Fri Oct 08, 2010 8:15 am 
Offline

Joined: Thu Oct 07, 2010 10:54 pm
Posts: 2
Hello all,
I'm new to antix and I like the look of it. My problem is that I'm unable to log in as root. This applies if I log out and attempt to log back in or if I shutdown and attempt a root log in from boot.
I'm not able to use "sudo" as, apparently, antix doesn't permit user to perform such actions so for "apt-get" I need to be root.
My test box is an old Dell GX260 with a P4 and 2G DDR, it's run just about everything before.
Any help would be gratefully received.


Top
 Profile  
 
 Post subject: Re: unable to log in as root
PostPosted: Fri Oct 08, 2010 12:37 pm 
Offline

Joined: Sat Oct 11, 2008 3:42 pm
Posts: 899
Location: Florida, USA
Hello Stakhanov and welcome to Antix:

Antix does not support logging in as root. Just log in as a regular user, open a terminal and type:

su

and then your root password (which you set up during install)

then you can perform root functions, such as apt-get.

Post if you have any other problems and enjoy Antix.

Pedro


Top
 Profile  
 
 Post subject: Re: unable to log in as root
PostPosted: Fri Oct 08, 2010 1:36 pm 
Offline
Site Admin
User avatar

Joined: Tue Sep 11, 2007 4:55 pm
Posts: 5758
Location: Greece
Welcome to antiX.

As Pedro says, plus if you use a gui app as root, use sux rather than su.
If you really want to be able to login as root (not advisable, but it is your box), copy the .xinitrc file in your home/username folder (it is hidden) to /root folder.

_________________
Philosophers have interpreted the world in many ways; the point is to change it.


Top
 Profile  
 
 Post subject: Re: unable to log in as root
PostPosted: Fri Oct 08, 2010 2:47 pm 
Offline

Joined: Thu Oct 07, 2010 10:54 pm
Posts: 2
Thank you gentlemen,
I discovered the antix way just a few minutes ago but I appreciate your replies. Apt-get couldn't find the package I wanted (giver) anyway but at least I can use it for other applications.


Top
 Profile  
 
 Post subject: Re: unable to log in as root
PostPosted: Fri Oct 08, 2010 2:50 pm 
Offline

Joined: Sat Oct 11, 2008 3:42 pm
Posts: 899
Location: Florida, USA
Did you try apt-get update first? Also, might want to try synaptic under control center.


Top
 Profile  
 
 Post subject: Re: unable to log in as root
PostPosted: Thu Oct 14, 2010 5:07 pm 
Offline

Joined: Sun Mar 07, 2010 10:29 pm
Posts: 89
As an addendum to this, should you wish to, it is still possible to use sudo in Anti-x; just do the following:

Code:
su
apt-get install sudo
geany /etc/sudoers 2> /dev/null &


In the geany editor, copy the line that reads 'root ALL=(ALL) ALL', and paste it to the next line, replacing 'root' with your username, i.e. mine reads 'stuart ALL=(ALL) ALL'. Save and close down geany, and 'exit' at the commandline.

Now you can run sudo. You can also add your username to the 'wheel' group, but I forget how this is done now.


Top
 Profile  
 
 Post subject: Re: unable to log in as root
PostPosted: Sat Mar 11, 2017 11:29 pm 
Offline

Joined: Sun Mar 14, 2010 3:31 pm
Posts: 44
Stuart O'mahony wrote:
As an addendum to this, should you wish to, it is still possible to use sudo in Anti-x; just do the following:

Code:
su
apt-get install sudo
geany /etc/sudoers 2> /dev/null &


In the geany editor, copy the line that reads 'root ALL=(ALL) ALL', and paste it to the next line, replacing 'root' with your username, i.e. mine reads 'stuart ALL=(ALL) ALL'. Save and close down geany, and 'exit' at the commandline.

Now you can run sudo. You can also add your username to the 'wheel' group, but I forget how this is done now.


Just seen this and want to say that this is excellent advice, so thank you! When I used sudo before, I had a lot of trouble with the command failing and then getting the message '(Colonel Panic's username) is not in the sudoers file, incident will be reported'; until I did what it suggested.

"In the geany editor, copy the line that reads 'root ALL=(ALL) ALL', and paste it to the next line, replacing 'root' with your username, i.e. mine reads 'stuart ALL=(ALL) ALL'. Save and close down geany, and 'exit' at the commandline."

So far I haven't needed to add my username to the 'wheel' group, but I'll bear it in mind in case I do.


Top
 Profile  
 
 Post subject: Re: unable to log in as root
PostPosted: Sun Mar 12, 2017 2:09 am 
Offline

Joined: Thu Feb 09, 2012 7:29 am
Posts: 1046
Ouch.
You've followed advice from 2010.
When you "followed advice" and attempted to install sudo, did you happen to notice that now, in 2017, it is already pre-installed?

Although no one replied back then to point out that Stuart's "fix" is misguided... it is misguided.

Point #1
The `visudo` command exists to handle edits to the sudoers file.
Using a text editor to directly edit the file invites the possibility introducing space/formatting characters, rendering it (and your entire system) "broken".

Point #2
Running with a rule like "scoobie ALL=(ALL) ALL" creates a really insecure (exploitable) and destined-to-fail scenario.
Further, after workaround-ing the step of using sudo, scoobie will often not achieve the indended/expected result.
Files created/output by commands performed by scoobie... will be "owned by" scoobie (not by root) and... OUCH!
A command exec'ed by scoobie... may be unable to read from (or write to) root-only -permissioned directories, and... ???
Various processes, expecting to find root-owned files, will refuse to acknowledge files "owned by" scoobie, and... FAIL!

Hopefully a skim through the manpages will help you to understand the importance of using sudo
man sudo
man sudoers


Top
 Profile  
 
 Post subject: Re: unable to log in as root
PostPosted: Sun Mar 12, 2017 6:01 am 
Offline

Joined: Sun Mar 14, 2010 3:31 pm
Posts: 44
Thank you. Yes it is already installed, but *most distros I've tried (not antiX) don't have visudo so it's mcedit, vi, vim etc. or nothing (which also isn't an option because sudo won't let me execute the command).

I'll take your suggestion and read the sudo and sudoers manfiles, but I'm a bit pushed for time right now so it won't be immediately. Anyway, if you think it's a bad idea to edit the sudoers file in the way Stuart suggests I'll refrain from doing so in the future.

- CP

* Yes I know "stick with antiX in future" is an option, and it's one I'm willing to consider.


Top
 Profile  
 
 Post subject: Re: unable to log in as root
PostPosted: Sun Mar 12, 2017 12:20 pm 
Offline
User avatar

Joined: Thu Jul 26, 2012 9:46 pm
Posts: 709
Location: Surrey/Hants Border UK
Main reason why changing to the 'root' operator is not 'easy' is because you can do a lot of damage to your installation if you don't know what you are doing.

The purpose of sudo, is to only give some 'root' options/commands to a user.

_________________
Linux (& BSD) since 1999.
(Now also ukuleles & harmonicas.)


Top
 Profile  
 
 Post subject: Re: unable to log in as root
PostPosted: Sun Mar 12, 2017 12:54 pm 
Offline

Joined: Sun Mar 14, 2010 3:31 pm
Posts: 44
fatmac wrote:
Main reason why changing to the 'root' operator is not 'easy' is because you can do a lot of damage to your installation if you don't know what you are doing.

The purpose of sudo, is to only give some 'root' options/commands to a user.


Sure, I understand that and I think it's a definite plus point when compared to Windows (or at least those versions I'm most familiar with) where a user can do untold damage to their system by running without restrictions and allowing viruses, trojans etc. to take hold.

The problem is that there's also the other extreme, where you end up not being able to do even simple operations within your system, like moving files from one folder to another, as an ordinary user because the system won't let you; and that's the position I've found myself in more than once recently (and why I even know that a file called sudoers, and an application called visudo, exist). Not with AntiX, I hasten to add, but I've had quite a long absence from AntiX and only reinstalled it very recently.

Wouldn't it be nice if there was a middle way, where you could operate your system safely, including making any necessary changes, but also easily and without having to edit any configuration files?


Top
 Profile  
 
 Post subject: Re: unable to log in as root
PostPosted: Sun Mar 12, 2017 4:44 pm 
Offline
User avatar

Joined: Thu Jul 26, 2012 9:46 pm
Posts: 709
Location: Surrey/Hants Border UK
Moving files, or rather not being able to, sounds like a permissions problem on the directories, maybe you just need to add yourself to the group that they belong to.

_________________
Linux (& BSD) since 1999.
(Now also ukuleles & harmonicas.)


Top
 Profile  
 
 Post subject: Re: unable to log in as root
PostPosted: Sun Mar 12, 2017 5:05 pm 
Offline

Joined: Sun Mar 14, 2010 3:31 pm
Posts: 44
fatmac wrote:
Moving files, or rather not being able to, sounds like a permissions problem on the directories, maybe you just need to add yourself to the group that they belong to.


Thanks for replying. That sounds about right, but it's not the only situation in which logging in as root is required; I've also needed (and often) to change the date and time after I logged in.

https://www.cyberciti.biz/faq/howto-set ... nd-prompt/

What I think probably would fix it permanently would be a "root terminal" which I've seen in some distros, which requires you to enter a root password as soon as you open it up; is it possible to set up one of those in AntiX?


Top
 Profile  
 
 Post subject: Re: unable to log in as root
PostPosted: Sun Mar 12, 2017 6:40 pm 
Offline

Joined: Sun Mar 14, 2010 3:31 pm
Posts: 44
Here's a post which explains how to add your username to the sudo group, which seems to me to be at least a partial solution and makes it unnecessary to enter the password every time sudo is used;

Just add the user to the sudo group:

sudo adduser <username> sudo

The change will take effect the next time the user logs in.

This works because /etc/sudoers is pre-configured to grant permissions to all members of this group (You should not have to make any changes to this):

# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL


http://askubuntu.com/questions/7477/how ... mmand-line


Top
 Profile  
 
 Post subject: Re: unable to log in as root
PostPosted: Sun Mar 12, 2017 8:46 pm 
Offline
User avatar

Joined: Sat Jan 30, 2016 1:43 am
Posts: 52
hello stakhanov and hello everone
hi Colonel Panic "root terminal" we found is in the Menu : >Applications >System Tools > Root Terminal.
in antix this will ask for the sudo group User password, not root password, to open a superuser priveleged console.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
suspicion-preferred