Can´t log in as root HELP?
Hi list! I was told that I´t wasn´t good to alow root logins (I´m new to Suse). I then used YAST to click ~"don´t alow root logins" thinking I would be able to "su" when I needed to be root. I then found out that "su" doesn´t work so I tried "sudo" instead, but that doesn´t work either. Is there any way for me to enter my current system as root now/again? or Do I have to format the hd and install a new system? (I have Suse 10.0) /Peo
On 9/18/06, Peo Nilsson wrote:
Hi list!
I was told that I´t wasn´t good to alow root logins (I´m new to Suse). I then used YAST to click ~"don´t alow root logins" thinking I would be able to "su" when I needed to be root. I then found out that "su" doesn´t work so I tried "sudo" instead, but that doesn´t work either.
Is there any way for me to enter my current system as root now/again?
or
Do I have to format the hd and install a new system?
(I have Suse 10.0)
/Peo
Can you start YaST while logged as regular user? What happens when it asks for root password, and you provide it? If you can start YaST, then go and revert the change you made. Now, about root login - it is not good to allow remote root logins, so you need to change the sshd config file. Also you can change if root can login using the graphical interface (KDE) - this is done in KDE Control Center. But I do not see any benefit of not allowing a console logins. -- -- Svetoslav Milenov (Sunny) Windows is a 32-bit extension to a 16-bit graphical shell for an 8-bit operating system originally coded for a 4-bit microprocessor by a 2-bit company that can't stand 1 bit of competition.
On Mon, 2006-09-18 at 17:48 -0500, Sunny wrote:
On 9/18/06, Peo Nilsson wrote:
Hi list!
I was told that I´t wasn´t good to alow root logins (I´m new to Suse). I then used YAST to click ~"don´t alow root logins" thinking I would be able to "su" when I needed to be root. I then found out that "su" doesn´t work so I tried "sudo" instead, but that doesn´t work either.
Is there any way for me to enter my current system as root now/again?
or
Do I have to format the hd and install a new system?
(I have Suse 10.0)
/Peo
Can you start YaST while logged as regular user? What happens when it asks for root password, and you provide it? If you can start YaST, then go and revert the change you made.
When I start Yast It doesn´t ask for root password (not any else password either), It starts up and the only thing I´m able to do is: Software->Media Check. Everything else is "empty" (no other icons no matter what I choose).
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Tuesday 2006-09-19 at 00:41 +0200, Peo Nilsson wrote:
I was told that I´t wasn´t good to alow root logins (I´m new to Suse).
They refer to _remote_ logins, not local. Also working as root is not recomended except when absolutely necesary. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD4DBQFFDyLCtTMYHG2NR9URAodDAJUYLfWSqn4vk0dsGT1EXAU4+8Y+AJsELuiw aKbWQRJviHBZ1DQ+mir23A== =QkW9 -----END PGP SIGNATURE-----
Hi list!
I was told that I´t wasn´t good to alow root logins (I´m new to Suse). I then used YAST to click ~"don´t alow root logins" thinking I would be able to "su" when I needed to be root. I then found out that "su" doesn´t work so I tried "sudo" instead, but that doesn´t work either.
Is there any way for me to enter my current system as root now/again? When you used su to be root what was the exact command you issued as
Peo Nilsson wrote: there are two, both with different results. Both Plain 'su' or 'su root' when you are a user will ask you for the root password and change your command prompt fro a $ to a #. However the path used will still be the same as the user you are su'ing from ie it will not include the locations root needs to execute commands. If you do 'su -' it will again ask for the root password and change your coammnd prompt from a $ to a #. Now however, because of the dash, you are using roots path anf therefore the root programs you try and execute will work as they are able to access the required libraries they need fro the locations listed in the PATH. For more reading, please see 'info su'. HTH Regards Hylton -- ======================================================================== Currently using unpatched SuSE 9.2 Professional with KDE and Mozilla 1.7.2 Linux user # 229959 at http://counter.li.org ========================================================================
On Tue, 2006-09-19 at 16:42 +0200, Hylton Conacher(ZR1HPC) wrote:
Hi list!
I was told that I´t wasn´t good to alow root logins (I´m new to Suse). I then used YAST to click ~"don´t alow root logins" thinking I would be able to "su" when I needed to be root. I then found out that "su" doesn´t work so I tried "sudo" instead, but that doesn´t work either.
Is there any way for me to enter my current system as root now/again? When you used su to be root what was the exact command you issued as
Peo Nilsson wrote: there are two, both with different results. Both
I execute ´su´ and then the bash shell asks for root password, when I type in the correct password the shell responds with ´incorrect password´. I´m 100% sure that the password I type is correct. Now I also have tried ´su root´ with the same result.
Plain 'su' or 'su root' when you are a user will ask you for the root password and change your command prompt fro a $ to a #. However the path used will still be the same as the user you are su'ing from ie it will not include the locations root needs to execute commands.
If you do 'su -' it will again ask for the root password and change your coammnd prompt from a $ to a #. Now however, because of the dash, you are using roots path anf therefore the root programs you try and execute will work as they are able to access the required libraries they need fro the locations listed in the PATH.
For more reading, please see 'info su'.
HTH
Regards Hylton -- ======================================================================== Currently using unpatched SuSE 9.2 Professional with KDE and Mozilla 1.7.2 Linux user # 229959 at http://counter.li.org ========================================================================
/Peo
On 20/09/06 00:02, Peo Nilsson wrote:
<snip>
I execute ´su´ and then the *bash* shell asks for root password, when I type in the correct password the shell responds with ´incorrect password´. I´m 100% sure that the password I type is correct. Now I also have tried ´su root´ with the same result. Boot into runlevel 1 (at the grub or lilo prompt, just type a '1', then <enter>). You should be prompted for the root password when the system comes up -- if it won't take here, you are truly out of luck.
On Wednesday 20 September 2006 02:13, Darryl Gregorash wrote:
On 20/09/06 00:02, Peo Nilsson wrote:
<snip>
I execute ´su´ and then the *bash* shell asks for root password, when I type in the correct password the shell responds with ´incorrect password´. I´m 100% sure that the password I type is correct. Now I also have tried ´su root´ with the same result.
Boot into runlevel 1 (at the grub or lilo prompt, just type a '1', then <enter>). You should be prompted for the root password when the system comes up -- if it won't take here, you are truly out of luck.
Hi Darryl, Wouldn't entering 'init=/bin/bash' (no quotes) at the grub boot menu result in the system booting to a working shell with root permissions? Carl
Carl Hartung wrote:
On Wednesday 20 September 2006 02:13, Darryl Gregorash wrote:
On 20/09/06 00:02, Peo Nilsson wrote:
<snip>
I execute ´su´ and then the *bash* shell asks for root password, when I type in the correct password the shell responds with ´incorrect password´. I´m 100% sure that the password I type is correct. Now I also have tried ´su root´ with the same result. Boot into runlevel 1 (at the grub or lilo prompt, just type a '1', then <enter>). You should be prompted for the root password when the system comes up -- if it won't take here, you are truly out of luck.
Hi Darryl,
Wouldn't entering 'init=/bin/bash' (no quotes) at the grub boot menu result in the system booting to a working shell with root permissions?
Or failing that, boot with a rescue disk and manually copy a known password or remove it entirely.
On 20/09/06 05:34, Carl Hartung wrote:
On Wednesday 20 September 2006 02:13, Darryl Gregorash wrote:
On 20/09/06 00:02, Peo Nilsson wrote:
<snip>
I execute ´su´ and then the *bash* shell asks for root password, when I type in the correct password the shell responds with ´incorrect password´. I´m 100% sure that the password I type is correct. Now I also have tried ´su root´ with the same result.
Boot into runlevel 1 (at the grub or lilo prompt, just type a '1', then <enter>). You should be prompted for the root password when the system comes up -- if it won't take here, you are truly out of luck.
Hi Darryl,
Wouldn't entering 'init=/bin/bash' (no quotes) at the grub boot menu result in the system booting to a working shell with root permissions? I have no idea; I've never investigated init's possibilities beyond entering a number :-)
On Wed, 2006-09-20 at 07:34 -0400, Carl Hartung wrote:
On Wednesday 20 September 2006 02:13, Darryl Gregorash wrote:
On 20/09/06 00:02, Peo Nilsson wrote:
<snip>
I execute ´su´ and then the *bash* shell asks for root password, when I type in the correct password the shell responds with ´incorrect password´. I´m 100% sure that the password I type is correct. Now I also have tried ´su root´ with the same result.
Boot into runlevel 1 (at the grub or lilo prompt, just type a '1', then <enter>). You should be prompted for the root password when the system comes up -- if it won't take here, you are truly out of luck.
when booting ==> xxx... Master resource control: Previous runlevel N, switching to runlevel 1 xxx... Give root password for login: ´CORRECT ROOT PASSWORD´ --> ´Login incorrect´
Hi Darryl,
Wouldn't entering 'init=/bin/bash' (no quotes) at the grub boot menu result in the system booting to a working shell with root permissions?
Carl
When booting with: init=/bin/bash ...xxx... ==>(none):/# (none):/# whoami --> root This seems to work. But when I run yast I can´t find any place where root login is forbidden...:-( I guess It´s just to edit a file directly in emacs (in the above "mode") to alow root logins again. Unfortunately I´m new to Suse Linux so I have no clue which file to make the change in??? /Thx Peo
* Peo Nilsson
When booting with: init=/bin/bash
...xxx... ==>(none):/# (none):/# whoami --> root
This seems to work. But when I run yast I can´t find any place where root login is forbidden...:-( I guess It´s just to edit a file directly in emacs (in the above "mode") to alow root logins again. Unfortunately I´m new to Suse Linux so I have no clue which file to make the change in???
when you reach login as above, you must change or remove root's password as you apparently are not using the password that the system expects. iirc: edit /etc/passwd find root you will see something like: root:x:0:0:root:/root:/bin/bash REMOVE the second field, x save run "passwd root " and enter the password you desire. -- Patrick Shanahan Registered Linux User #207535 http://wahoo.no-ip.org @ http://counter.li.org HOG # US1244711 Photo Album: http://wahoo.no-ip.org/gallery2
On Wed, 2006-09-20 at 19:57 -0400, Patrick Shanahan wrote:
* Peo Nilsson
[09-20-06 19:27]: When booting with: init=/bin/bash
...xxx... ==>(none):/# (none):/# whoami --> root
This seems to work. But when I run yast I can´t find any place where root login is forbidden...:-( I guess It´s just to edit a file directly in emacs (in the above "mode") to alow root logins again. Unfortunately I´m new to Suse Linux so I have no clue which file to make the change in???
when you reach login as above, you must change or remove root's password as you apparently are not using the password that the system expects.
iirc: edit /etc/passwd find root you will see something like: root:x:0:0:root:/root:/bin/bash REMOVE the second field, x
save
I did.
run "passwd root "
´passwd root´ ==> ~"user doesn´t exist"
and enter the password you desire. --
Then I thought lets add a new user then (root) ==> not possible because root already exist...:-( Next step was to run yast ==> complained about a "bad" ´/etc/passwd´ file because I removed the second field ´x´. I then edited /etc/passwd again and wrote back the second field ´x´. Solution: Boot with option: init=/bin/bash ==> (none):/# whoami ==> root 1) ´yast´ 2) Security and Users 2.1) User Management User and Group Management => Users Set Filter as "System Users. Choose ´root´ Choose ´edit´ Unmarke ´Disable User Login ==> Back in bussiness! I realy would like to THANK you all for your help. Without your great help I would never have my "system back". The root password was not wrong, but the system told me that It was (when the right answere should be ´root login is not allowed´).
Patrick Shanahan Registered Linux User #207535 http://wahoo.no-ip.org @ http://counter.li.org HOG # US1244711 Photo Album: http://wahoo.no-ip.org/gallery2
/Cheers Peo
On Wednesday 20 September 2006 20:51, Peo Nilsson wrote:
Boot with option: init=/bin/bash ==> (none):/# whoami ==> root
1) ´yast´ 2) Security and Users 2.1) User Management User and Group Management => Users Set Filter as "System Users. Choose ´root´ Choose ´edit´ Unmarke ´Disable User Login
==> Back in bussiness!
I realy would like to THANK you all for your help. Without your great help I would never have my "system back". The root password was not wrong, but the system told me that It was (when the right answere should be ´root login is not allowed´).
Glad to see you sorted it out, Peo! And thank you very much for posting a clear description of the problem *and* the solution that worked. Others will benefit when they run into the same problem. regards, Carl
On Wed, 2006-09-20 at 20:58 -0400, Carl Hartung wrote:
I realy would like to THANK you all for your help. Without your great help I would never have my "system back". The root password was not wrong, but the system told me that It was (when the right answere should be ´root login is not allowed´).
Glad to see you sorted it out, Peo! And thank you very much for posting a clear description of the problem *and* the solution that worked. Others will benefit when they run into the same problem.
regards,
Carl
Excuse me for using the list for this, but I´m SO happy...:-) If you drink Whisky and is in Sweden sometime, there´s an Islay waiting for you (and the others that helped). Just send me an email! /CHEERS Peo
When booting with: init=/bin/bash
...xxx... ==>(none):/# (none):/# whoami --> root
This seems to work. But when I run yast I can´t find any place where root login is forbidden...:-( I guess It´s just to edit a file directly in emacs (in the above "mode") to alow root logins again. Maybe try to run the passwd command to change it to a new passwd, and
Peo Nilsson wrote: try again. -- Joe Morris Registered Linux user 231871
On Monday 18 September 2006 18:41, Peo Nilsson wrote:
Hi list!
I was told that I´t wasn´t good to alow root logins (I´m new to Suse).
Due to security considerations, it is discouraged for SSH (remote access) as well as for desktop environments like KDE and GNOME, etc.
I then used YAST to click ~"don´t alow root logins"
In what YaST module did you make this change? Tell me how to navigate there, starting from the main 'YaST Control Center' main menu. (I don't have time to track this down right now.)
thinking I would be able to "su" when I needed to be root. I then found out that "su" doesn´t work so I tried "sudo" instead, but that doesn´t work either.
Can you explain what "doesn't work" means? Can you not login at all, as 'superuser' (with root permissions)? Or are the commands not functioning as expected?
Is there any way for me to enter my current system as root now/again?
Try switching to a text console (Ctl+Alt+F1 thru F6) and try logging in as root. If it works, run the command "yast" to launch YaST in ncurses (text) mode and reverse the change you made, above.
or
Do I have to format the hd and install a new system?
This 'solution' is usually overly drastic and should be reserved as a "last resort" measure. regards, Carl
On Tue, 2006-09-19 at 11:47 -0400, Carl Hartung wrote:
In what YaST module did you make this change? Tell me how to navigate there, starting from the main 'YaST Control Center' main menu. (I don't have time to track this down right now.)
Can´t use YaST as It is now (fully). Don´t remember exactly how I navigated without seeing YaST fully functional.
Can you explain what "doesn't work" means? Can you not login at all, as 'superuser' (with root permissions)? Or are the commands not functioning as expected?
When I type ´root´ as login name and the CORRECT password the shell says: ´Login incorrect´
Try switching to a text console (Ctl+Alt+F1 thru F6) and try logging in as root. If it works, run the command "yast" to launch YaST in ncurses (text) mode and reverse the change you made, above.
Same result as above. (´Login incorrect´)
This 'solution' is usually overly drastic and should be reserved as a "last resort" measure.
I realy hope I don´t have to (but I have a feeling that it will end up that way...)
regards,
Carl
On Thursday 21 September 2006 00:02, Peo Nilsson wrote:
This 'solution' is usually overly drastic and should be reserved as a "last resort" measure.
I realy hope I don´t have to (but I have a feeling that it will end up that way...)
Nonono... use a Linux DVD and boot to a rescue system. Mount the hold root dir and edit the /etc/passwd file (under the old root, not the rescue root). Simply remove the password for root. Then you can boot up, log in, and change the password back. -- ----- stephan@s11n.net http://s11n.net "...pleasure is a grace and is not obedient to the commands of the will." -- Alan W. Watts
On Thursday 21 September 2006 06:52, stephan beal wrote:
On Thursday 21 September 2006 00:02, Peo Nilsson wrote:
This 'solution' is usually overly drastic and should be reserved as a "last resort" measure.
I realy hope I don´t have to (but I have a feeling that it will end up that way...)
Nonono... use a Linux DVD and boot to a rescue system. Mount the hold root dir and edit the /etc/passwd file (under the old root, not the rescue root). Simply remove the password for root. Then you can boot up, log in, and change the password back.
Did you overlook this post? Or are you on dialup?: On Wednesday 20 September 2006 20:51, Peo Nilsson wrote: <snip>
Solution:
Boot with option: init=/bin/bash ==> (none):/# whoami ==> root
1) ´yast´ 2) Security and Users 2.1) User Management User and Group Management => Users Set Filter as "System Users. Choose ´root´ Choose ´edit´ Unmarke ´Disable User Login
==> Back in bussiness!
I realy would like to THANK you all for your help. Without your great help I would never have my "system back". The root password was not wrong, but the system told me that It was (when the right answere should be ´root login is not allowed´).
Carl
On Thursday 21 September 2006 14:57, Carl Hartung wrote:
On Thursday 21 September 2006 06:52, stephan beal wrote:
On Thursday 21 September 2006 00:02, Peo Nilsson wrote:
This 'solution' is usually overly drastic and should be reserved as a "last resort" measure.
I realy hope I don´t have to (but I have a feeling that it will end up that way...)
Nonono... use a Linux DVD and boot to a rescue system. Mount the hold root dir and edit the /etc/passwd file (under the old root, not the rescue root). Simply remove the password for root. Then you can boot up, log in, and change the password back.
Did you overlook this post? Or are you on dialup?:
The problem is that i read the posts in order of oldest-to-newest, and often get Suse mails in batches of 50+ (each morning there are *lots* of new posts), so i'm answering to stuff that's already been addressed. -- ----- stephan@s11n.net http://s11n.net "...pleasure is a grace and is not obedient to the commands of the will." -- Alan W. Watts
On Thursday 21 September 2006 12:31, stephan beal wrote:
The problem is that i read the posts in order of oldest-to-newest, and often get Suse mails in batches of 50+ (each morning there are *lots* of new posts), so i'm answering to stuff that's already been addressed.
Why don't you enable threading? You're running KMail 1.9.1, aren't you? KMail supports threading really well, so you can read threads in their entirety before responding. Carl
participants (10)
-
Carl Hartung
-
Carlos E. R.
-
Darryl Gregorash
-
Hylton Conacher(ZR1HPC)
-
James Knott
-
Joe Morris (NTM)
-
Patrick Shanahan
-
Peo Nilsson
-
stephan beal
-
Sunny