PDA

View Full Version : I think I messed up user account.


Ken_ver_1_5
07-11-2005, 03:31 PM
after using useradd to make a user account I could not find
the account and it would not log in so I used userdel
ok fine. but now can't log in to root I get a pass word
error. I must have messed up some where.
I can however log into my account.
any ideas as to fix this mess I have made.

using a debian distro.

Ken_ver_1_5
07-11-2005, 05:11 PM
well after playing musical passwords I got things back.
still wish I could have done it in terminal oh well...

sybil
07-11-2005, 06:01 PM
Ken - check this:
http://panuganty.tripod.com/debiantips/boot.htm
In effect, if you have messed up or forgot your root password, you need to boot directly into a shell. You can then remove the root password, which allows you to boot normally and access root without a password. You can then set a new one.

Check and see if your system uses shadow passwords ( that's double encrypted). Open a terminal window and type:
cd /etc
then type:
less passwd
This will give you the password file. If the second section in each line is an x, then you are using shadow passwords.
Now you can type:
less shadow
You should see the encrypted passwords.
If you needed to remove the root password, you would need to edit the line starting with root and remove the password.

Ken_ver_1_5
07-11-2005, 07:14 PM
thanks Sybil I will give that a try. I did manage to set things strait.
I have two user accounts. I am stuck on the permission thing.
I have logged in as root and set read/write permissions to allow
myself to edit a file but I can't seem to get the other user
the same access unless I change the permissions for the file itself.
I would like to give read write access to all users in a group to use
the floppy. I think I may be going about it in the wrong way in the
user group manager. still learning.

sybil
07-11-2005, 08:10 PM
You may find it easier in command line. Have to go find some food, but I'll try and find some good references for you. Also maybe describe a bit more specifically what you're trying to do.

sybil
07-11-2005, 08:19 PM
One thing, while logged in to root, you can test the permissions for a specific user, using that user's permissions by using the command: su <user id>
You don't need a password and will take over that user's permissions. exit will get you back to root permissions.

Ken_ver_1_5
07-12-2005, 02:14 PM
thanks for the passwd tip I am using shadow.

ok so I am just getting started.

now when I try (as root) to test permissions using "su abc 2000"
I get unknown id.

Its probably syntax error on my part.

now what am I trying to do is:
I want two users to have the same permissions we'll call them user1 abc
and user 2 def. when I installed I went in as root. then selected users and groups
from the menu. I clicked add user on the account page I input user name (abc)
then a password. on the advanced page I did nothing as I could not understand
it and %user (main groups) I think means auto. on the other groups page did
nothing. I clicked ok and logged out saving settings and tested the new user.
while in the abc account I when back to user and group (needed root password)
and got the properties for user abc. on the advanced page it says

main group: abc
shell: bin/bash
home directory: home/abc
user id: 2000.

on the other groups
nothing listed.
{second user as follows}
Main group: def
shell: bin/bash
home directory: home/def
user id: 2001
nothing listed in other groups.

*** I tried to do this in terminal but that when the passwords
got messed up. so I chose the gui way***

now here is were things get funny.
{back in root account) I select the floppy drive and go to properties.
file owner is root.
group owner is root.

I check permissions for all (r) (w) (E)
all on:
owner
group
others.
the box below has no checks for
set user id
set group id
set sticky.
[I left them alone]
text view: drwxrwxrwx.

so I saved and logged out of root and logged in to abc.
I put a floppy in the drive made a small text file and
put it on the floppy hay! it worked. I unmounted the
drive logged out (saving settings) and logged in to def
mounted the drive and tried to take the file off.
no way it says. so I make a new file and tried to
copy it to the floppy now way again. so that were I
am at I know I have some learning to do and I need
a better grasp of the linux language.
sorry if this is a bit long and thanks so much for your help.

Ken_ver_1_5
07-12-2005, 03:33 PM
found this site http://www.linuxjunior.org/cgi-bin/pet/pet.cgi?SUBMIT=Display&id=67

for a little more understanding of

I check permissions for all (r) (w) (E)
all on:
owner
group
others.
the box below has no checks for
set user id
set group id
set sticky.
[I left them alone]
text view: drwxrwxrwx.

having a bit of trouble getting my phat head around
set user id
set group id

not that I have come close to an answer to my
problem but I thought it may help others to
I posted the link.

Ken_ver_1_5
07-14-2005, 11:35 AM
I am still working on the above problem.
I have been trying different things.
but I still can't get permissions to work
right. my main system (win98) if I want to share
the floppy drive with other users (computers)
I simply share it and set the permissions to
give read and write. I keep thinking I am doing
something wrong in linux. I haven't found in any
of the many help forums that says I can't share
the floppy drive and give full access to the floppy
or content within.
I believe I understand that the floppy is a device
and linux is seeing it as a folder and there is two
sets of permissions one for the floppy itself and
another for the content. if the content was made
on the floppy both users should be abel to work
with and change the file.
oh well its back to google:)

sybil
07-14-2005, 12:15 PM
Ken, the content will take on the permissions of the user. Try adding the files from one of the users rather than root, or are you not able to access the drive at all? You said your using debian - one of the debian distros or straight debian? Will try to do some experimenting later, when I have time, but just deleted my last install, so I can gain some space temporarily and will install a different one to play with shortly.

Ken_ver_1_5
07-14-2005, 01:39 PM
I can access the drive from both users. I believe your correct
about the content.

Sorry Sybil I should have mentioned that.

its Debian GNU/Linux 3.1 R0a Official i386 Binary-1

from this site http://www.nl.debian.org/CD/

using bit torent from here http://cdimage.debian.org/debian-cd/3.1_r0a/i386/bt-cd/

sybil
07-14-2005, 07:13 PM
Geez, you don't pick the easiest distro, do you ;). Take a look at this for your floppy problem.
http://www.tuxfiles.org/linuxhelp/fstab.html

Ken_ver_1_5
07-16-2005, 11:06 AM
lol I sure do I guess, I like it better than linspire.
thanks for the link I guess I have some reading
to do:)

sybil
07-16-2005, 01:57 PM
I tried quickly to install it, but it install my ethernet (onboard Nvidia gigabit), and don't have the time or patience right now to fiddle (also installs by default to text mode, which is fine, but since I have an ati card and no access to internet till I get the ethernet working..............) Will play with it later - in the meantime installed Fedora Core 4 and will check out your problem.

Ken_ver_1_5
07-16-2005, 02:03 PM
thanks Sybil we'll figure it out lol.