AOA Forums

AOA Forums (http://www.aoaforums.com/forum/index.php)
-   Linux (http://www.aoaforums.com/forum/forumdisplay.php?f=120)
-   -   Fedora, users and groups...questions! (http://www.aoaforums.com/forum/showthread.php?t=46605)

Daniel ~ 26th January, 2009 02:03 AM

Fedora, users and groups...questions!
 
Hi all.

I've clone a drive and given it to Patti. I set up an identity for her ( I think!). But as I have Fedora set to Auto login at boot...Where do I tell fedora to drop me and boot to Patti?

When I do will she be left with just a desktop as you are in W2K? Or will she fully benefit from the things I've set up?

As this IS a learning situation for Patti I'd like her to have full Admin rights ( She has a back up drive! ":O}

Naturally I'm quite hesitant to just delete myself from her machine before knowing she can boot under her name and what she'll be booting to! TIA Guys! ":O}

Gizmo 26th January, 2009 04:13 AM

Err......no. The stuff we set up was under YOUR user (Daniel), so you can set Patti to log in, but she'll be her own user, instead of you, and she won't have any of the things you've set up.

However, all is not lost.

I've never tried this, but in THEORY, you can rename the 'Daniel' user in /etc/passwd, and the 'Daniel' group in /etc/groups both to 'Patti' and then rename the /home/daniel folder to /home/patti, and be rocking.

Daniel ~ 26th January, 2009 05:00 AM

hmmm. sounds like the kind of thing that could get a girl locked out!....? ":O}

Gizmo 26th January, 2009 07:34 AM

Yup, sure could. Then again, I'm quite able to lock out an account without editing the password files. LOL.

Ok, so here's what you'd do. You can do this with the drive that's in Patti's computer: You'll need to login as root. Since you've got the computer set to autologin, I'm guessing you'll have to log out, and then log back in as root. Anyway, once you've logged in as root, do the following:

Code:

gedit /etc/passwd
Find the line that says something like:

Daniel:x:500:500:Daniel:/home/Daniel:/bin/bash

Replace all occurences of Daniel (or whatever your login name is) with Patti (or whatever her login name is).

Save that and close gedit. Now do:

Code:

gedit /etc/group
There will be several lines in this file that contain your username. Replace every instance of your username with Patti's username. Save and close gedit. Now do:

Code:

gedit /etc/shadow
Once again, replace every occurrence of your username with Patti's. There should only be one line, and it should look something like this:

chris:$7$h6AWd0q3xB51oJlO$2Oi5Jwg.VYgFysLmOoQFt2jb PAZ3B3OJRij1yB87Db7CbQZb4U9Mf/vtWLRqFgtOoSqRvlXY/inVpSZeARlae.:14076:0:99999:7:::

Once again, save and close gedit. Now do:

Code:

gedit /etc/gdm/gdm.schemas
Again, change every occurrence of your username to Patti's username.

At this point, you should be able to log out as root, and log back in AS PATTI, BUT WITH YOUR PASSWORD.

Either that, or you're locked out and need to reimage the drive. LOL.

If you want to give me a chance to muck about a bit first, I can test this sometime tomorrow and see how it works out.

Kaitain 26th January, 2009 10:20 AM

Works if you've not got an encrypted shadow.

If you don't mind duplicating everything, and would like to have the option to log in as yourself then the other way is to create a username for Patti, set it to autologin to Patti's username as Gizmo describes and:
cp -r /home/Daniel/* /home/Patti/* && chown -r /home/Patti/*

In both cases, no need to reimage the drive if you get it wrong. Simply log in as root (assuming you remember the root password) then do:

passwd Daniel

to reset the Daniel password or:


passwd Patti

to reset the Patti password.

For most Linux distros it's also possible to reset the root password given a boot disc and a little patience. Reinstalling is a Windows game ;)

Daniel ~ 26th January, 2009 07:20 PM

OK, I 'll put Patti's life in your hands! ":O}

She and I have agreed to do this together...worst case, I'll have to restore from back up and try again.":O}

Probably won't be until much later today, she's looking for work most days...

Daniel ~ 26th January, 2009 07:56 PM

Quote:

Originally Posted by Gizmo (Post 488800)
Yup, sure could. Then again, I'm quite able to lock out an account without editing the password files. LOL.

If you want to give me a chance to muck about a bit first, I can test this sometime tomorrow and see how it works out.

I think this would be best. Then if you and I could arrange a time to do this step by step I'd be a lot more comfortable that I was getting things right. Sorry...I may never be comfortable doing this stuff! ":O}

BTW I say again...I only have one password, never set up a user account, just boot, then Su to root when I need permission for something like updates or in terminal...As I need to su and give a password, I always assumed that all was well!

Daniel ~ 27th January, 2009 07:56 PM

I'm confused about "Login in as root". I thought anytime I opened terminal and su to root I was login as root?

Gizmo 27th January, 2009 10:49 PM

Not exactly. SU means 'set user'. Basically, you are taking on the permissions of the user you su to, but you are not 'logged in' as that user; you are still logged in as you. Because of that, if you make a change to your profile while logged in, that change won't take effect until the next time you log in. In certain cases, the change may be blown away by updates to your profile that occur when you logout. Hence, you need to login as a different user.

EVERY unix system has a user called 'root'. If the system is configured for security, then the 'root' user won't be able to login with a shell the way a normal user can, and the only way will be to login as a regular user who is a member of the 'wheel' group and su. Sometimes, the root user CAN login, but only from the local console (i.e. the root user can't login remotely using ssh or something like that, but only from the local keyboard).

Daniel ~ 27th January, 2009 11:05 PM

2 Attachment(s)
I'm going to keep reading what you've posted....for some reason I'm just not getting something...Among others....I don't know how to "Log in as root" I mistakenly thought that was what I was doing when I su.

Here's my Users and group file...What do I need do to gain compliance good sir!

Gizmo 28th January, 2009 12:45 AM

I don't think you can make the edits we need to make using that tool. You have to actually do it using gedit or vi (or something similar).

Back before we set up your autologin, you were presented with a screen asking you what user you wanted to login with. That screen had your 'Daniel' user, and it also said 'other'.

If you selected 'Other' you'd be presented with a text box in which you could type in the username. That is where you'd type root.

Daniel ~ 28th January, 2009 03:27 AM

So we need to undo auto logon so I can boot and select "Other" then Type "Root"?

But before that we need to set a password for root? I have gedit installed.

ccperf721p 28th January, 2009 03:35 AM

You could use usermod to change the name to Patti, then move /home/Daniel to /home/Patti as well. Not sure how that would affect autologin but I have fedora installed in a VM I could sacrifice to find out.. :)

Daniel ~ 28th January, 2009 03:46 AM

As she is the average unappreciative computer user who could care less about those things I wait for.... We must be sure we don't mess with her if we can at all help it....my mental health may well depend on this! ":O}

In short whatever we do should have a high probability of success...or at lest that we do no harm...she's looking for work and really needs her box right now....so, like BIG thanks Cliff!

ccperf721p 28th January, 2009 05:30 AM

A couple of questions before I give any instructions.

Are you going to be using Patti's computer as another user, or will you just login as Patti if you need to?

If you do create a user do you plan to share files between the two users?

Daniel ~ 28th January, 2009 08:09 PM

I would use Patti's computer only if mine were down and I needed to stay in touch until fixed. I would have no problem just using her computer when mine is down.

We Use to have a Windows "HOME" home net between our two machines...we will have to learn how to set that up in Fedora. ( Hardware and cables still set up though our router.)

While Your asking the last thing I can think of that we need to do is set patti's printer up on her machine and create some kind of access to it( printer) from my machine.

ccperf721p 29th January, 2009 03:21 AM

Quote:

Originally Posted by Daniel ~ (Post 488952)
I would use Patti's computer only if mine were down and I needed to stay in touch until fixed. I would have no problem just using her computer when mine is down.

We Use to have a Windows "HOME" home net between our two machines...we will have to learn how to set that up in Fedora. ( Hardware and cables still set up though our router.)

While Your asking the last thing I can think of that we need to do is set patti's printer up on her machine and create some kind of access to it( printer) from my machine.

Looks like the easiest way would be to create a user for Patti, copy over your files and settings to her Home directory.

Setting up a share between computers isn't too much trouble. Do we need to share files with Windows or just linux?

Which model is your printer? Hopefully it is a linux friendly printer..

ccperf721p 29th January, 2009 05:06 PM

I'll gather the last bits of info from you before we add a user and copy the files.

Open up a terminal, su to root and then paste the output of

Code:

groups Daniel

Daniel ~ 29th January, 2009 07:40 PM

Quote:

Originally Posted by ccperf721p (Post 488996)
I'll gather the last bits of info from you before we add a user and copy the files.

Open up a terminal, su to root and then paste the output of

Code:

groups Daniel


[Daniel@localhost ~]$ su
Password:
[root@localhost Daniel]# groups Daniel
Daniel : Daniel
[root@localhost Daniel]#

Daniel ~ 29th January, 2009 07:44 PM

Quote:

Originally Posted by ccperf721p (Post 488983)
Looks like the easiest way would be to create a user for Patti, copy over your files and settings to her Home directory.

Setting up a share between computers isn't too much trouble. Do we need to share files with Windows or just linux?

Which model is your printer? Hopefully it is a linux friendly printer..

Thanks Cliff. No neither of us will be using/maintaining Windows going forward. So just Linux.

Be sure to let me know when we should move from MY computer. where I am now, over to Patti's computer...I have Tried to set up an account for Patti on the drive in her machine, then I saw how easily I could blow it, I left things lie, but you may want to see What I did...just so you know!

Printer:
Hewlett Packard
DeskJet 722C

Patti wants you to know that as this is an old printer and new ones are cheep, she can replace it if we need to gain compadibilty..


All times are GMT +1. The time now is 10:28 PM.


Copyright ©2001 - 2010, AOA Forums


Search Engine Friendly URLs by vBSEO 3.3.0