Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
Debian newbie-can't sign in as root
-
- Posts: 2
- Joined: 2010-01-22 22:58
Debian newbie-can't sign in as root
I just did clean install of Debian 503 today & it's so fast, I love it, compared to Ubuntu. I cannot install packages though as the normal user, it keeps asking me to sign as root. When I su- at terminal, it says I'm not in sudoers file..., or if I try root terminal it tells me wrong password. But I know I'm entering the password correctly. I cannot edit the /etc/sudoers file and save it unless I'm root apparently, so I am stuck. I don't know what to do. I've googled this & spent 2 hours now looking through the debian installation guides, etc., to no avail. Any help would be greatly appreciated. The install went fine, my basic question is, how do I sign in as root, or avoid using root and get things to work? Thanks.
-
- Posts: 2
- Joined: 2010-01-22 22:58
Re: Debian newbie-can't sign in as root
Hey thanks for the reply, but I already did that. I've been entering "su" and it says that I am not in the sudoers file. I think I don't understand how Debian works versus Ubuntu relating to sudo. I've already done what you told me to do, and it does not work. I am looking for the solution to why it is doing that.
Re: Debian newbie-can't sign in as root
Why is it saying anything about sudo? You aren't using sudo. Where is sudo coming into all this?
Can you copy/paste exactly what you are doing in the terminal as well as the output you get?
Can you copy/paste exactly what you are doing in the terminal as well as the output you get?
Re: Debian newbie-can't sign in as root
There are two root enabling apps: sudo and su. Sudo is used in Ubuntu and it does not work in Debian, you will not be a "sudoer" even if you are the one that has installed the operating system. Nevertheless, sudo can be found in Debian for some reason.
While being in Debian, forget sudo and similar commands (gksudo, etc.) and use su. Therefore:
(1) Open a terminal
(2) write su on the command prompt and press Enter ("su", not "sudo")
(3) you get a password prompt. Enter password and press Enter.
(4) you get a prompt with # at its end
You can run windowed apps from the command prompt. You will be root until you quit the root console (by entering "exit" command).
While being in Debian, forget sudo and similar commands (gksudo, etc.) and use su. Therefore:
(1) Open a terminal
(2) write su on the command prompt and press Enter ("su", not "sudo")
(3) you get a password prompt. Enter password and press Enter.
(4) you get a prompt with # at its end
You can run windowed apps from the command prompt. You will be root until you quit the root console (by entering "exit" command).
- roseway
- Posts: 1528
- Joined: 2007-12-31 22:50
- Location: Kent, UK
- Has thanked: 3 times
- Been thanked: 4 times
Re: Debian newbie-can't sign in as root
That's not the case. If you want to run windowed apps as root, type kdesu <program> (if you use KDE) or gksu <program> (if you use Gnome, or probably other desktop environments). Alternatively, you can install the package sux and then use sux instead of su.You can run windowed apps from the command prompt.
Eric
- Absent Minded
- Posts: 3464
- Joined: 2006-07-09 08:50
- Location: Washington State U.S.A.
- Been thanked: 3 times
Re: Debian newbie-can't sign in as root
Please make sure that you really check things before you make a statment saying something does not work in Debian... sudo works just fine in Debian it just has to be set up correctly first. That said, most Debian users prefer to use su instead of sudo. There are many reasons for this... doing a quick search on the topic should clue you in.Radvan wrote:There are two root enabling apps: sudo and su. Sudo is used in Ubuntu and it does not work in Debian, you will not be a "sudoer" even if you are the one that has installed the operating system. Nevertheless, sudo can be found in Debian for some reason.
While being in Debian, forget sudo and similar commands (gksudo, etc.) and use su. Therefore:
(1) Open a terminal
(2) write su on the command prompt and press Enter ("su", not "sudo")
(3) you get a password prompt. Enter password and press Enter.
(4) you get a prompt with # at its end
You can run windowed apps from the command prompt. You will be root until you quit the root console (by entering "exit" command).
Serving the community the best way I can.
Spreading the tradition of Community Spirit.
Please read some Basic Forum Philosophy
Give a man a fish, he eats for a day. Teach him how to fish, he eats for life.
Updated Nov. 19, 2012
Spreading the tradition of Community Spirit.
Please read some Basic Forum Philosophy
Give a man a fish, he eats for a day. Teach him how to fish, he eats for life.
Updated Nov. 19, 2012
Re: Debian newbie-can't sign in as root
(1) gksu gnome-commander
(2) su gnome-commander
(3) su
gnome-commander
exit
I had (3) in mind. Wiccanhart1 wanted to log in as root, not run a single command as root. (1) works, (2) does not work as expected, (3) works, you can run both for CLI and windoed apps between "su" and "exit".
(2) su gnome-commander
(3) su
gnome-commander
exit
I had (3) in mind. Wiccanhart1 wanted to log in as root, not run a single command as root. (1) works, (2) does not work as expected, (3) works, you can run both for CLI and windoed apps between "su" and "exit".
- roseway
- Posts: 1528
- Joined: 2007-12-31 22:50
- Location: Kent, UK
- Has thanked: 3 times
- Been thanked: 4 times
Re: Debian newbie-can't sign in as root
As I said before, that isn't the case. If you try to open a windowed app after using su, you get an error message that it's unable to open the display. However, if you install the package sux, then su is symlinked to sux, and then you can run windowed apps after using su.(3) works, you can run both for CLI and windoed apps between "su" and "exit".
Eric
Re: Debian newbie-can't sign in as root
1) if one has got a display-manager installed (gdm,xdm,kdm,slim) you get an error when trying to open a gui-app from a terminal emulator as root (say: su ; gedit gives the said error).
one needs to make us of kdesu/gksu or sux.
2) if one don't have a display-manager installed it does work (become root with su and open any app you like)
thats how it is for me. ymmv.
i was wondering for a long time what trouble people were talking about, till i found out that they come up when i run a display-manager.
ps: same goes for sudo: it depends! if you don't allow root to login during installation you will get a sudo-account.
at least the last time i tried/tested.
one needs to make us of kdesu/gksu or sux.
2) if one don't have a display-manager installed it does work (become root with su and open any app you like)
thats how it is for me. ymmv.
i was wondering for a long time what trouble people were talking about, till i found out that they come up when i run a display-manager.
ps: same goes for sudo: it depends! if you don't allow root to login during installation you will get a sudo-account.
at least the last time i tried/tested.
"I am not fine with it, so there is nothing for me to do but stand aside." M.D.
Re: Debian newbie-can't sign in as root
You could run graphical application as any user/root
But remember that starting graphical application as root is not secure.
This is what you need to do, incase you want to do.
This works with display managers.
But remember that starting graphical application as root is not secure.
This is what you need to do, incase you want to do.
This works with display managers.
Code: Select all
as user
xhost +
Now login to other user/root using su -
export DISPLAY=':0.0' (generally the display is 0)
graphicalapp
Compressed Air Energy Storage, Entropy and Efficiency
http://saurorja.org/2012/06/18/compress ... fficiency/
http://saurorja.org/2012/06/18/compress ... fficiency/
Re: Debian newbie-can't sign in as root
When you installed debian you were asked for a "root" password and a user name & user password. When you type "su" you need to enter the "root" password you supplied during the instalation.wiccanhart1 wrote:I just did clean install of Debian 503 today & it's so fast, I love it, compared to Ubuntu. I cannot install packages though as the normal user, it keeps asking me to sign as root. When I su- at terminal, it says I'm not in sudoers file..., or if I try root terminal it tells me wrong password. But I know I'm entering the password correctly. I cannot edit the /etc/sudoers file and save it unless I'm root apparently, so I am stuck. I don't know what to do. I've googled this & spent 2 hours now looking through the debian installation guides, etc., to no avail. Any help would be greatly appreciated. The install went fine, my basic question is, how do I sign in as root, or avoid using root and get things to work? Thanks.
You can also use "su" with the command flag;
Code: Select all
su -c "<the set of commands to run>"
-
- Posts: 8
- Joined: 2009-12-22 09:32
Re: Debian newbie-can't sign in as root
Try opening a root terminal from the menu. There is a menu option to open the root terminal, when it opens, you will have to enter the password. This way there is no need to enter su command. If you still do not succeed then maybe the root password is incorrect(?).
-
- Posts: 544
- Joined: 2008-10-25 12:00
- Location: Canada
Re: Debian newbie-can't sign in as root
Not sure if OP has figured out how yet, but be sure you're not typing "sudo su". It's just "su".
Re: Debian newbie-can't sign in as root
sad but trueoOarthurOo wrote:Not sure if OP has figured out how yet, but be sure you're not typing "sudo su". It's just "su".
maybe we need an ubuntu detox forum too.
-
- Posts: 1740
- Joined: 2009-05-04 15:56
- Been thanked: 1 time
Re: Debian newbie-can't sign in as root
This is certainly more insecure than it need be as you just allowed anyone from anywhere.aspnair wrote:You could run graphical application as any user/root
But remember that starting graphical application as root is not secure.
This is what you need to do, incase you want to do.
This works with display managers.Code: Select all
as user xhost + Now login to other user/root using su - export DISPLAY=':0.0' (generally the display is 0) graphicalapp
Code: Select all
xhost SI:localuser:root
I feel the need to once again rain on the anti sudo parade. Sudo was around long before Ubuntu and the fact that Uduntu decided to use it in a terrible way does not make sudo bad any more than the fact that Ubuntu decided to use Debian in a bad way makes Debian bad.
-
- Posts: 24
- Joined: 2010-01-29 05:19
Re: Debian newbie-can't sign in as root
In Ubuntu you just do:
sudo somecommand
and enter your login password. IIRC you can run GUI apps this way, but gksudo is better for that.
In Debian by default you are not in the sudoers file so this will not work. You need to use the Root Terminal in the menu, and from there you could add yourself to /etc/sudoers, though someone with more experience would have to tell whether that's a good idea.
sudo somecommand
and enter your login password. IIRC you can run GUI apps this way, but gksudo is better for that.
In Debian by default you are not in the sudoers file so this will not work. You need to use the Root Terminal in the menu, and from there you could add yourself to /etc/sudoers, though someone with more experience would have to tell whether that's a good idea.
Re: Debian newbie-can't sign in as root
dont try to turn debian into ubuntuHyperHacker wrote:In Ubuntu you just do:
sudo somecommand
and enter your login password. IIRC you can run GUI apps this way, but gksudo is better for that.
In Debian by default you are not in the sudoers file so this will not work. You need to use the Root Terminal in the menu, and from there you could add yourself to /etc/sudoers, though someone with more experience would have to tell whether that's a good idea.