Koozali.org formerly Contribs.org

Desperate help needed - user templates

Desperate help needed - user templates
« on: September 16, 2014, 04:33:26 PM »
I really hope someone out there can help me

Today we had a power supply failure in our server, we didn't realize what it was and tried rebooting the server which then
lost power while booting and has corrupted
the system (I did a lot of research at that point and found a restore/rebuild is only option)

We have a mirror server that backs up via affa. The problem is that when we tried to raise the server
it said there was no archive.0 the data appears to be in the directory prodserv/schedule.running but affa --rise-all prodserv
just returns an error.

Its now 2am here and in desperation we have manually moved the data from the affa backup from the /var/affa... to /home/e-smith
and /etc

we can log onto the server manager and all of the users are there, the setup is all correct however we cannot
map to any ibays (data is there) or log on to webmail says invalid password.

I'm assuming it is something to do with user templates and passwords however this is a step beyond my linux skills.

All I want to achieve tonight is a server that somehow, someway, that staff can log onto (map) ibays tomorrow.
With what I have done I'm sure I have destabilized the server but I'm desperate at present and will rebuild the whole
thing in the weekend

I still have one of the raid disks that will boot until we get to

exec of /sbin/init failed: No such file or directory
kernel panic, Not syncing :Attempting to kill init!

the system hangs at that point. We can get onto the disk via linux system restore

if anyone is out there and has a suggestion please please help to either fix the raid disk or help me reconfigure the
mirror server so the user accounts work

Cheers
Allan

Re: Desperate help needed - user templates
« Reply #1 on: September 16, 2014, 06:14:47 PM »
I still have one of the raid disks that will boot until we get to

exec of /sbin/init failed: No such file or directory
kernel panic, Not syncing :Attempting to kill init!

the system hangs at that point.

It's important to know what appears on the screen before those lines. Exactly why is /sbin/init not found? Perhaps the / file system wasn't mounted. In any case, the preceding messages will have told you something.

The fact that you can access the system via rescue disk is useful, but that depends on what you learn and can do once the system is started from rescue disk.


Re: Desperate help needed - user templates
« Reply #2 on: September 16, 2014, 06:24:29 PM »
Hi Charlie

I can't putty in to the server unfortunately so it is abridged.

Everything looks normal until

 2 logical volume(s) in volume group "main"
trying to resume from /dev/main/swap
no suspend signature on swap, not resuming
creating root device

(standard stuff)

EXT3-fs error (device dm-0) ext3_lookup:unlinked inode 399212596 in dir #399212545
exec of init (/sbin/init)failed!!! no such file or directory
Kernal Panic - not syncing; attempting to kill init!

system hangs at that point

Re: Desperate help needed - user templates
« Reply #3 on: September 16, 2014, 06:39:30 PM »
EXT3-fs error (device dm-0) ext3_lookup:unlinked inode 399212596 in dir #399212545
exec of init (/sbin/init)failed!!! no such file or directory
Kernal Panic - not syncing; attempting to kill init!

So you have a corrupted file system. I don't know why that wouldn't also be a problem when you mount the file system from the rescue disk.

What did you see, and do, when you mounted the disk in rescue mode?

If this was my system, I'd be cloning the two drives, and then trying to recover one of them.

Re: Desperate help needed - user templates
« Reply #4 on: September 16, 2014, 06:56:19 PM »
Hi Charlie

Using Linux Rescue it mounts the system and tells me a can do a chroot however that fails.
but I can navigate around /sysimage/.....
I have taken a clone of the drive already

when i booted from the CD it did say I could do an "upgrade" this failed with a lot of debugging notes
regarding anaconda failing. Sorry I can cut and paste them

How would go about recovery ?


Cheers



Offline janet

  • ****
  • 4,812
Re: Desperate help needed - user templates
« Reply #5 on: September 17, 2014, 02:33:10 AM »
Allan Pritchard

Quote
affa --rise-all prodserv
just returns an error.....
it said there was no archive.0 the data appears to be in the directory prodserv/schedule.running....

Did you use the correct syntax, note there is a space between rise and --all, & two dashes before all ie
from the wiki article
affa --rise [--all] JOB [ARCHIVE]

in your case
affa --rise --all prodserv

Maybe the wrong syntax in the command prevented the archive from being accessed.
If it transpires that a certain archive is truly not available, then you could specify the last known available good archive
ie
affa --rise --all prodserv scheduled.0

Note that the use of --all is optional, read the wiki why you would (or would not) use it, it does not seem absolutely necessary to me.
http://wiki.contribs.org/Affa

I would not attempt to rise using a scheduled.running archive, as that is a backup that is incomplete, & will obviously be missing some data, ie the backup was stopped part way through & is waiting to finish the next time it can. Perhaps this was due to the power supply failure issue.

Quote
Its now 2am here and in desperation we have manually moved the data from the affa backup from the /var/affa... to /home/e-smith
and /etc

Just moving the data is probably not sufficient, as you have not restored the mysql databases (from the dump file), so that would explain why webmail is not accessible (ie wrong password). It may also explain other issues. Probably you have moved the dump file back to the server (with other data) but not ran the suitable commands to restore the contents to the mysql database system.
 

Charlie has suggested to try & fix one cloned drive.
As you have already tried using Affa rise, I suggest you try that again, this time using the correct command syntax.
It may be your quickest solution for now.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Re: Desperate help needed - user templates
« Reply #6 on: September 17, 2014, 03:18:20 AM »
Thanks Janet

Yes, we followed the wiki and used the correct syntax etc, sorry when I wrote that it was pushing 4am here I should have written it out correctly, we also checked for previous affa archives and there were none. That is something we will have to check out, however it is a moot point at present, we do have
backups of the mirrored server as a fall back.

We have taken the two raid drives to a data recovery center to see if they can rebuild the drive.

Initially I recreated every user and was trying to place their data in the Home directories and also put the data back in the ibays.
somewhere along the line it has picked up the settings. I'm afraid my knowledge around mysql is limited but I recognized what had probably occurred.

Thank you both for your help and advice

Cheers
Allan


Re: Desperate help needed - user templates
« Reply #7 on: September 17, 2014, 06:46:23 AM »


Just one last question.

The raid drive partition tables were not recoverable so we are reinstalling. There are only 25 users on the server so setup isn't too bad.
we have the entire /home/e-smith on a usb drive.
Copying ibays seems to be fine using rsync copying ibayname/files to ibayname/files. We did the urgent stuff this morning and rest will run overnight 

My question is
If I setup all of the users with the same usernames and passwords as the old server and the new server and old server have the same server name
can I rsync the /users/username/home and /users/username/Maildir from the old server usb drive to the new server? Can anyone foresee any issues I might face.
Should I do the whole Maildir or just certain parts such as /cur ?

There are a few topics about transferring emails but they all seem to be between working servers.

Your advice would be much appreciated, even if it is a link to read up on.

Regards
Allan

guest22

Re: Desperate help needed - user templates
« Reply #8 on: September 17, 2014, 07:15:57 AM »
Hi Allan,

I myself can not help you, but maybe stefano or stephdl can. They might be around in about 2 hours.

Good luck!

guest

Offline stephdl

  • *
  • 1,512
    • Linux et Geekeries
Re: Desperate help needed - user templates
« Reply #9 on: September 17, 2014, 07:29:14 AM »
My question is
If I setup all of the users with the same usernames and passwords as the old server and the new server and old server have the same server name
can I rsync the /users/username/home and /users/username/Maildir from the old server usb drive to the new server? Can anyone foresee any issues I might face.
Should I do the whole Maildir or just certain parts such as /cur ?

There are a few topics about transferring emails but they all seem to be between working servers.

Your advice would be much appreciated, even if it is a link to read up on.

You can copy effectively the WHOLE data of each users with rsync (rsync -avz). Launched by root with this options normally it keeps the good ownership, else you can set up with chown (chown arthur:arthur -R /home/e-smith/files/users/athur/

here an example of ownership on my users it is simple

# ll /home/e-smith/files/users/
total 12
drwxr-xr-x 3 admin    admin    4096 10 mars   2014 admin
drwx------ 5 plop      plop      4096  9 juin  21:38 plop
drwx------ 5 arthur arthur 4096  9 juin  21:38 arthur

it should be the same for ebay except that with the server-manager you could automatically set the correct ownership

In short

create ibay, create user, put data, set the correct ownship and it should be done....
« Last Edit: September 17, 2014, 07:32:33 AM by stephdl »
See http://wiki.contribs.org/Koozali_Foundation
irc : Freenode #sme_server #sme-fr

!!! Please write your knowledge to the Wiki !!!

Re: Desperate help needed - user templates
« Reply #10 on: September 17, 2014, 08:52:10 AM »


Thanks for advice. I will create the users and copy the data as soon as the ibays have finished copying.
we have found the ownerships are all over the place from the original HD but it is easy to clean up
once the copy has completed.

Possibly that was one of my issues last night when I copied a user over to see if it would work
on the test server. I forgot to check the permissions which may have ended up as admin or root.

I will post the results tomorrow, off to bed now after 36hrs  :)

cheers
Allan

Re: Desperate help needed - user templates
« Reply #11 on: October 02, 2014, 02:50:59 AM »


Hi All,

We got the server up and going in the end, there were a few issues and settings that we had forgot that we changed such
as concurrent connections issues with email.

config setprop imaps ConcurrencyLimitPerIP 50
signal-event post-upgrade; signal-event reboot

solved the issue.

All users bar a few users have access to their home drive. For the life of my I cannot work out why they cannot access their home drive via mapping a network drive in windows. The error is "Access Denied" there passwords are correct and they can sync with the imaps server and retrieve all their old emails

The only thing I can think of is they are possibly the users that when we rebuilt the server and create the user we miss-spelt their user id and then deleted the user
and recreated them. example below was initially created as jeremy whereas his id should have been jeremya

I have checked all of the permissions on his /home/e-smith/files/users/jeremya

drwxr-xr-x 11 jeremya jeremya 4096 Sep 12 12:45 home
drwxr-xr-x 18 jeremya jeremya 4096 Oct  2 11:51 Maildir

We deleted his user account from the server and then recreated him, even without copying his data back he could not map to the home folder.
We tried resetting his password
We tried selecting "use other credentials" in windows however this appears not to work for any user trying to map to a different users home folder
on any windows PC.
We have triple checked his windows login and password and we are not using roaming profiles.

We deleted (renamed) the home folder and samba log shows

[2014/09/29 09:54:47.305468,  0] smbd/service.c:190(set_current_service)
  chdir (/home/e-smith/files/users/jeremya/home) failed, reason: No such file or directory

Another issue, which is possibly related, is that some users have access to ibays they shouldn't.
their group access is set correctly but they can gain access, it appears random.
We have 3 main ibays
name       group
Datafiles - staff
comp-files - management
directors - shareholders 

some members of "staff" only can access the ibays comp-files and/or directors 

Does anyone have any suggestions of what we should try next ?

Regards
Allan


Offline janet

  • ****
  • 4,812
Re: Desperate help needed - user templates
« Reply #12 on: October 02, 2014, 03:04:47 AM »
Allan

Just a thought.
Go into server manager users panel, groups panel & ibays panel.
Select to modify each user, group & ibay one by one. Do not change any settings unless they are wrong, then Save each one. That may restore correct permissions ownership & so on.
For groups maybe delete & recreate.

Also do your Windows workstations/users log in to sme server as a DOMAIN controller ?
If so were the machine passwords correctly copied over during your rather wild restore procedure.
You may consider to unjoin a workstation from the DOMAIN & rejoin it.

Having said the above you really should determine what the problem is before trying to fix it.
eg compare permissions & ownership etc with a clean install of sme server, check log files & so on.
« Last Edit: October 02, 2014, 03:13:14 AM by janet »
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Re: Desperate help needed - user templates
« Reply #13 on: October 02, 2014, 07:20:37 AM »
Hi,

Yes, have double checked all permissions for users.

After selecting Workgroup or domain controller = yes.

This has cured the the 3-4 staff having issues connecting to their home folder. YAY thank you for pointing me the right direction
however I'm not sure why only 3-4 staff out of 20 had an issue.

After changing each ibay to another group and then back again to its correct group it seems to have also solved the permission issue. Although I will have to do random checks on various users to make sure.

As for cause I am unsure as I used rysync -avz /path/ to /path/ which is suppose to preserve ownerships and permissions.


Thanks for you help it was much appreciated.

Cheers
Allan

Offline mmccarn

  • *
  • 2,568
Re: Desperate help needed - user templates
« Reply #14 on: October 03, 2014, 01:46:04 PM »
As for cause I am unsure as I used rysync -avz /path/ to /path/ which is suppose to preserve ownerships and permissions.

(possibly irrelevant, but...) I think rsync will create the new files on the target system using the user ID from the source system - so ownership will only be correct if the two user databases are identical -- that is, only if the user IDs are the same on both systems.