LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 06-24-2006, 04:57 PM   #1
adin
LQ Newbie
 
Registered: Mar 2004
Distribution: Redhat 9.0, knoppix
Posts: 11

Rep: Reputation: 0
Unhappy seems I locked myself out...


------------------------
What commands will allow a restricted user to login?
------------------------
background:
Installed Debian flavor that came on my knoppix dvd.

I have three partitions:
hda1=windowsxp, hda2=debian, hda3=empty

I used the command as a user:
sudo dd if=/dev/hda1 of=/dev/hda3
to image my windows installation but got an error message something like "tried to ... as ... this incident will be reported."

I tried it again as root, and it worked well.

After that my username was restricted.
Now I can't login, except as root, and only to the terminal.

Oh, and root got a mail telling of the incident.
I don't want to login as root all the time, and I can't
use GUI as root.

Help?

Thanks.

~A
 
Old 06-24-2006, 08:52 PM   #2
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,731
Blog Entries: 4

Rep: Reputation: 68
I can say that regular users do not generally have access to block devices such as you were trying. I have no idea why you were 'restricted' but there are a few ways of doing this you can check:

1. Open /etc/password (as root) and look for your username. If there is an '*' in the second field then change it to 'x'. If it says '/bin/false' i n the last field, change it to '/bin/bash' or your favorite shell.

2. Open /etc/limits and have a look if you can see: "<username> L0" and change the '0' to a positive number (this is the maximum number of concurrent logins allowed for your user).

3. Maybe some sort of PAM damage, in which case I have no idea...
 
Old 06-24-2006, 08:53 PM   #3
burntfuse
Member
 
Registered: Sep 2005
Location: Laurel, MD, USA
Distribution: Slackware 10.1, FC5
Posts: 164

Rep: Reputation: 30
You can log in as root and create a new user account for yourself with the 'adduser' command - see this page for details.
 
Old 06-24-2006, 10:10 PM   #4
adin
LQ Newbie
 
Registered: Mar 2004
Distribution: Redhat 9.0, knoppix
Posts: 11

Original Poster
Rep: Reputation: 0
thanx

thanks for the help, but until i get a better understanding of how to manage user accounts, I'll be better off deleting it and creating a new one, as suggested.

this link tells how to add a user, but how do you remove one?
 
Old 06-24-2006, 10:29 PM   #5
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,731
Blog Entries: 4

Rep: Reputation: 68
Quote:
thanks for the help, but until i get a better understanding of how to manage user accounts, I'll be better off deleting it and creating a new one, as suggested.
Hogwash. I just told you two ways to check for a locked out user. If you had followed through perhaps you might have gotten "a better understanding of how to manage user accounts".

Quote:
I'll be better off deleting it and creating a new one, as suggested.
That is the MS way of doing things.

Quote:
this link tells how to add a user, but how do you remove one?
You delete their entry in /etc/passwd and /etc/shadow, then delete their home directory.

I suppose you will want to keep the data and settings in your home directory. To do this you will have to make sure the new user you create has the same UID as your old user or else you will not have permissions on the file (look at the --uid option to adduser). If you already created a user and you have a different UID then you will need to recursively chown all of the files.

Are you learning yet? Good thing you didn't take a quick look at a simple text file like I suggested

Not trying to be a bitch here, but really. If you are not willing to dive head in you will not find much joy in Linux...
 
  


Reply

Tags
login, root, user


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
locked out kwickcut Mandriva 6 11-14-2005 10:09 PM
Locked out of SU... wiskic10_4 Linux - Newbie 6 12-03-2004 06:49 PM
Locked out of RH 9 carmoda Linux - Security 3 12-16-2003 09:44 AM
Locked out downinthemine Mandriva 1 10-28-2003 04:00 PM
locked out of X VioLaToR Linux - Newbie 15 11-12-2002 04:36 AM


All times are GMT -5. The time now is 02:12 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration