Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
------------------------
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.
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...
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?
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...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.