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 11-14-2003, 07:14 AM   #1
nick2003
LQ Newbie
 
Registered: Nov 2003
Posts: 29

Rep: Reputation: 15
Unhappy cant login as root


Hi, I cant seem to login as root, When i open the konsole and try to type login it tells me cannot change permissions of TTY operation not permited, it was working when i installed linux and i didnt change anything and then when i go to session/new root console it asks for a password and i put that in but im not in root, when i type login then root then my password it tells me my password is wrong but it works when installing software and everything, any help would be apreciated thanks.
 
Old 11-14-2003, 07:21 AM   #2
wapcaplet
LQ Guru
 
Registered: Feb 2003
Location: Colorado Springs, CO
Distribution: Gentoo
Posts: 2,018

Rep: Reputation: 48
I don't think 'login' is the command you want. Try typing this in a console:

su -

(s, u, space, hyphen). Enter the root password when it asks.
 
Old 11-14-2003, 07:27 AM   #3
szaroubi
Member
 
Registered: Oct 2003
Location: Montreal
Distribution: All/Any
Posts: 59

Rep: Reputation: 15
try su -l

-l <== The letter L (small caps)

This will "symulate" a login.
 
Old 11-14-2003, 07:29 AM   #4
szaroubi
Member
 
Registered: Oct 2003
Location: Montreal
Distribution: All/Any
Posts: 59

Rep: Reputation: 15
What you can also do is check out other Terminals.
Linux is beautifull can you can run many terminals.
To access them Type; Ctrl-Alt-FX
Where X=(1->6)
And if you wana go back to xWindows the type Ctrl-Alt-F7.
Once you are in a diffrent terminal you can login as root.
 
Old 11-14-2003, 07:35 AM   #5
jfshadow
Member
 
Registered: Feb 2002
Location: Amarillo, Texas
Distribution: Slackware 9.1 (desktop) / WinXP w/VMware linux dev/Tawie Server Linux (TSL) 2.0 (servers)/ LFS (dev)
Posts: 47

Rep: Reputation: 15
Not sure what you mean that it works installing software, etc...

As a regular user you can install packages, but you can't su to root, right???

Just off the bat, I would try to boot linux up into single user mode:

[reboot]
LILO: linux 1

This will start a linux shell as user root.

Type: passwd
and enter a new password for root (twice)

Type: init 5 (to go to the graphical runlevel, or) init 3 (to enter runlevel 3 - command line with multiple users/networking, etc)

From within a console or if your at a shell prompt, type: exit

Then try to login as root with the new password you supplied. If it doesn't work, then its likely that some of the libraries or something got corrupted. You may want to look over your logs under /var/log/messages to see if an error for root login attempt occurred that may help you resolve the problem. (or just re-install - last resort, of course ). If it does work . . . bingo!
 
Old 11-14-2003, 08:00 AM   #6
nick2003
LQ Newbie
 
Registered: Nov 2003
Posts: 29

Original Poster
Rep: Reputation: 15
Thanks guys, the su - and su -l worked but im now having another problem, what im trying to do is install the CrossOver plugin for quicktime, but i go into root then navigate to /home/(myusername)/Desktop and then type su then the filename and it tells me that i need to login as root. Im completly new to linux and dont know any of the commands so if someone could help me out i would apreciate it. Thanks
 
Old 11-14-2003, 08:18 AM   #7
szaroubi
Member
 
Registered: Oct 2003
Location: Montreal
Distribution: All/Any
Posts: 59

Rep: Reputation: 15
This is how su works (first read the manual (%>man su ) ... but I will explain)
su -l
will log you in as root and put you in root's home directory (/root)
If you want to run a command as root try:
su root -c "<insert_command_here>"
If you want to execute a command as user XYZ try
su XYZ -c "<insert command here>"

There is a trick ...
The -l switch (option) will log you in as root and change your current directory.
let say you want to know what is your current directory. you use the 'pwd' command like this:

%>pwd
/home/szaroubi/

If you do:
%>su -c "pwd"
/home/szaroubi

BUT!!!!! if you do:
%>su -l -c "pwd"
/root

THIS IS IMPORTANT ... VERY IMPORTANT
because if you do:
%>su -c "rm -rf *"
You will delete everything in the directory you are in (in example above: /home/szaroubi/*)

BUT if you do:
%>su -l -c "rm -rf *"
you will delete everything in /root ... This is wacky but know what the -l switch does.

-l will reset all your settings (well resets your environment variables) as if you just logged in as XYZ ...
without it you KEEP the same evironment variables. (If you don't nkow what envrionement variables are .. then you should read more in depth about what is found there.)

Hope this has been usefull
 
Old 11-14-2003, 12:41 PM   #8
nick2003
LQ Newbie
 
Registered: Nov 2003
Posts: 29

Original Poster
Rep: Reputation: 15
thanks szaroubi, I cant seem to launch the file though, first i logged into root by su - then i went to the desktop where my file is and typed su root -c and tryed the filename right after that in the same line and also another su then the filename but it wont launch it, is there something im missing? i tryed typing what you said about the manual the %>man su but it doesnt launch.
 
Old 11-14-2003, 12:46 PM   #9
szaroubi
Member
 
Registered: Oct 2003
Location: Montreal
Distribution: All/Any
Posts: 59

Rep: Reputation: 15
You should type '%>' That was just to say "run the following command in the shell.
What type of file?
What is the error msg?
What are the permissions on the file? (to get the permissions try: 'ls -la' the -l is for List and the -a is for All ..
To change the permissions try: chmod +x <filename>
It will change the mode of the file to eXecutable.
 
Old 11-14-2003, 01:45 PM   #10
nick2003
LQ Newbie
 
Registered: Nov 2003
Posts: 29

Original Poster
Rep: Reputation: 15
now when i try to launch it it tells me: su: user install-crossover-plugin-demo-2.0.2.sh does not exist
but when i double click it on my desktop it looks like it would install but it tells me i half to be root, is there a way i can log into root without the konsole? thanks
 
Old 11-14-2003, 02:44 PM   #11
szaroubi
Member
 
Registered: Oct 2003
Location: Montreal
Distribution: All/Any
Posts: 59

Rep: Reputation: 15
Do the following
su -l root
<ENTER ROOT PASSWORD>
cd <into the correct directory>
sh install-crossover-plugin-demo-2.0.2.sh

It should work ...
Did you read the README?
 
Old 11-14-2003, 03:44 PM   #12
nick2003
LQ Newbie
 
Registered: Nov 2003
Posts: 29

Original Poster
Rep: Reputation: 15
still doesnt work Ive found the problem though, i have the file on my desktop in my user account but when i try to save it in the root usr folder it says i dont have access, is there anyway i can get root access outside the konsole for things like this? and where should i save it in the usr folder, i read a thread on here that said in file but i dont have that folder, im in suse 9.0. Thanks for all your help i really apreciate it.
 
Old 11-14-2003, 04:43 PM   #13
TheOther1
Member
 
Registered: Feb 2003
Location: Atlanta, GA
Distribution: RHAS 2.1, RHEL3, RHEL4, SLES 8.3, SLES 9, SLES9_64, SuSE 9.3 Pro, Ubuntu, Gentoo
Posts: 335

Rep: Reputation: 32
You just want to copy it to the /root folder?

Open a terminal session, do a su - and enter root password. From the prompt, enter this:

cp /home/YOUR_USERNAME/Desktop/FILE_NAME /root and press enter.

YOUR_USERNAME = whatever you login as
FILE_NAME = the entire filename you want to copy

HTH!
 
Old 11-14-2003, 05:23 PM   #14
nick2003
LQ Newbie
 
Registered: Nov 2003
Posts: 29

Original Poster
Rep: Reputation: 15
thanks that worked for copying it there but it still tells me im not logged in as root but i know i am because it has the #, here is exactly what happend
95-a2:~ # sh install-crossover-plugin-demo-2.0.2.sh
Verifying archive integrity...OK
Uncompressing CrossOver Plugin.............................................................................................. .................................................................................................... .................................................................................................... .................................................................................................... .................................................................................................... ................................................................

The DISPLAY variable is not set. You should either login to as root or use
the command "su" with no flags, to make sure setup has an X display to use.
 
Old 11-14-2003, 05:45 PM   #15
nick2003
LQ Newbie
 
Registered: Nov 2003
Posts: 29

Original Poster
Rep: Reputation: 15
You guys probably think im an idiot lol, Im just so use to windows and its "one click" installing and everything that this linux is just really tuff, I did go to a couple sites and read alot of tutorials about the konsole but they dont mention installing things, Im begining to think that the problem is in the file itself though sense i was in root and it told me that. I really apreciate all your help with this you are all very helpful.
 
  


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
unable to login as user; can login as root. rksanders Debian 24 02-09-2011 08:01 AM
wrong login shell prevent root login cefs99 Linux - Security 4 05-31-2006 08:28 AM
I have re-installed MK 9.2 but cannot login as user, login as root works. bobinglis Mandriva 2 02-22-2004 11:39 AM
can only login as root? user login doesnt work..? anyone? hacking_4_b33r Linux - General 1 02-05-2004 11:40 PM
root login incorrect ,then passwd root,but error sunnycn Linux - Security 6 05-20-2002 10:54 AM

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

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