Hi, I need to send mail form shell script with Snow Leopard local postfix, but it doesn't work
echo "`whoami` login, `date`" | mail -s "test" [email protected]
Recently we had a motherboard failure on a terminal server so we replaced the faulty motherboard, re-setup the RAID arrays (same motherboard but still wouldn't recognize old RAID setup) and continued to recover the system from a previous backup.
No problem up to here, after restoring the system you are prompted to reboot and than login. On login we get a message box stating that Windows needs to be activated do you want to activate now, press yes but than the OS proceeds to log you off and do nothing at all. You can try over and over but to no avail.
Found a few articles about a glitch in the activation script and how to reset it, tried that with the same results. Hoping someone can share some knowledge if you have seen this before?
Thanks!
I wrote a few login batches in the Group Policy Management which mount specified devices to specified usergroups. The batches work as they should as long UAC is disabled.
My problem is that the UAC-account-users can't see their mounted network-drives because the login scripts run in elevated context. I tried to fix the problem with PsExec (-l) so that the network-folders are mapped with limited user rigths. But it seems that this won't work. (PsExec is already installed on all computers so it can work local.)
Has anyone an idea how to fix that problem? I spended a long time in trying to fix the problem but I did not find any solutions about THIS problem.
We have a small "homemade" server running fully updated Debian Wheezy (amd64). One hard drive installed: WDC WD6400AAKS. The motherboard is ASUS M4N68T V2.
The usual load:
CPU: an average of 20%
Each week about 50GB of additional space is occupied. About 47GB of uploaded files and 3GB of MySQL data.
I'm afraid that the hard drive may be about to fail. I saw Pre-fail on few places when I ran:
root@SERVER:/tmp# smartctl -a /dev/sda
smartctl 5.41 2011-06-09 r3365 [x86_64-linux-3.2.0-4-amd64] (local build)
Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net
=== START OF INFORMATION SECTION ===
Model Family: Western Digital Caviar Blue Serial ATA
Device Model: WDC WD6400AAKS-XXXXXXX
Serial Number: WD-XXXXXXXXXXXXXXXXXXX
LU WWN Device Id: 5 0014ee XXXXXXXXXXXXX
Firmware Version: 01.03B01
User Capacity: 640,135,028,736 bytes [640 GB]
Sector Size: 512 bytes logical/physical
Device is: In smartctl database [for details use: -P show]
ATA Version is: 8
ATA Standard is: Exact ATA specification draft version not indicated
Local Time is: Mon Oct 28 18:55:27 2013 UTC
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
General SMART Values:
Offline data collection status: (0x85) Offline data collection activity
was aborted by an interrupting command from host.
Auto Offline Data Collection: Enabled.
Self-test execution status: ( 247) Self-test routine in progress...
70% of test remaining.
Total time to complete Offline
data collection: (11580) seconds.
Offline data collection
capabilities: (0x7b) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
Offline surface scan supported.
Self-test supported.
Conveyance Self-test supported.
Selective Self-test supported.
SMART capabilities: (0x0003) Saves SMART data before entering
power-saving mode.
Supports SMART auto save timer.
Error logging capability: (0x01) Error logging supported.
General Purpose Logging supported.
Short self-test routine
recommended polling time: ( 2) minutes.
Extended self-test routine
recommended polling time: ( 136) minutes.
Conveyance self-test routine
recommended polling time: ( 5) minutes.
SCT capabilities: (0x303f) SCT Status supported.
SCT Error Recovery Control supported.
SCT Feature Control supported.
SCT Data Table supported.
SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x002f 200 200 051 Pre-fail Always - 0
3 Spin_Up_Time 0x0027 157 146 021 Pre-fail Always - 5108
4 Start_Stop_Count 0x0032 098 098 000 Old_age Always - 2968
5 Reallocated_Sector_Ct 0x0033 200 200 140 Pre-fail Always - 0
7 Seek_Error_Rate 0x002e 200 200 051 Old_age Always - 0
9 Power_On_Hours 0x0032 079 079 000 Old_age Always - 15445
10 Spin_Retry_Count 0x0032 100 100 051 Old_age Always - 0
11 Calibration_Retry_Count 0x0032 100 100 051 Old_age Always - 0
12 Power_Cycle_Count 0x0032 098 098 000 Old_age Always - 2950
192 Power-Off_Retract_Count 0x0032 200 200 000 Old_age Always - 426
193 Load_Cycle_Count 0x0032 200 200 000 Old_age Always - 2968
194 Temperature_Celsius 0x0022 111 095 000 Old_age Always - 36
196 Reallocated_Event_Count 0x0032 200 200 000 Old_age Always - 0
197 Current_Pending_Sector 0x0032 200 200 000 Old_age Always - 0
198 Offline_Uncorrectable 0x0030 200 200 000 Old_age Offline - 0
199 UDMA_CRC_Error_Count 0x0032 200 160 000 Old_age Always - 21716
200 Multi_Zone_Error_Rate 0x0008 200 200 051 Old_age Offline - 0
SMART Error Log Version: 1
No Errors Logged
SMART Self-test log structure revision number 1
Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
# 1 Short offline Completed without error 00% 15444 -
Error SMART Read Selective Self-Test Log failed: scsi error aborted command
Smartctl: SMART Selective Self Test Log Read Failed
root@SERVER:/tmp#
In one tutorial I read that the pre-fail is a an indication of coming failure, in another tutorial I read that it is not true. Can you guys help me decode the output of smartctl?
It would be also nice to share suggestions what should I do if I want to ensure data integrity (about 50GB of new data each week, up to 2TB for the whole period I'm interested in). Maybe I will go with 2x2TB Caviar Black in RAID4?
I have a Ruby on Rails application fronted by varnish+nginx. As most of the sites content is static unless you are a logged in user, I want to cache the site heavily with varnish when a user is logged out but only to cache static assets when they are logged in.
When a user is logged in they will have the cookie 'user_credentials' present in their Cookie: header, in addition I need to skip caching on /login and /sessions in order that a user can get their 'user_credentials' cookie in the first place.
Rails by default does not set a cache friendly Cache-control header, but my application sets a "public,s-max-age=60" header when a user is not logged in. Nginx is set to return 'far future' expires headers for all static assets.
The configuration I have at the moment is totally bypassing the cache for everything when logged in, including static assets — and is returning cache MISS for everything when logged out. I've spent hours going around in circles and here is my current default.vcl
director rails_director round-robin {
{
.backend = {
.host = "xxx.xxx.xxx.xxx";
.port = "http";
.probe = {
.url = "/lbcheck/lbuptest";
.timeout = 0.3 s;
.window = 8;
.threshold = 3;
}
}
}
}
sub vcl_recv {
if (req.url ~ "^/login") {
pipe;
}
if (req.url ~ "^/sessions") {
pipe;
}
# The regex used here matches the standard rails cache buster urls
# e.g. /images/an-image.png?1234567
if (req.url ~ "\.(css|js|jpg|jpeg|gif|ico|png)\??\d*$") {
unset req.http.cookie;
lookup;
} else {
if (req.http.cookie ~ "user_credentials") {
pipe;
}
}
# Only cache GET and HEAD requests
if (req.request != "GET" && req.request != "HEAD") {
pipe;
}
}
sub vcl_fetch {
if (req.url ~ "^/login") {
pass;
}
if (req.url ~ "^/sessions") {
pass;
}
if (req.http.cookie ~ "user_credentials") {
pass;
} else {
unset req.http.Set-Cookie;
}
# cache CSS and JS files
if (req.url ~ "\.(css|js|jpg|jpeg|gif|ico|png)\??\d*$") {
unset req.http.Set-Cookie;
}
if (obj.status >=400 && obj.status <500) {
error 404 "File not found";
}
if (obj.status >=500 && obj.status <600) {
error 503 "File is Temporarily Unavailable";
}
}
sub vcl_deliver {
if (obj.hits > 0) {
set resp.http.X-Cache = "HIT";
} else {
set resp.http.X-Cache = "MISS";
}
}
I need to keep track of the last login time for each user in our SQL Server 2005 database.
I created a trigger like this:
CREATE TRIGGER LogonTimeStamp
ON ALL SERVER FOR LOGON
AS
BEGIN
IF EXISTS (SELECT * FROM miscdb..user_last_login WHERE user_id = SYSTEM_USER)
UPDATE miscdb..user_last_login SET last_login = GETDATE() WHERE user_id = SYSTEM_USER
ELSE
INSERT INTO miscdb..user_last_login (user_id,last_login) VALUES (SYSTEM_USER,GETDATE())
END;
go
This trigger works for servers that are system admins but it won't allow regular users to login. I have granted public select,insert and update to the table but that doesn't seem to be the issue. Is there a way to set permissions on the trigger? Is there something else I am missing?
Thanks
The laptop is a recent Dell XPS 15z and the problem is as follows (reproducible about 90% of tries):
put laptop to sleep using either Start-Sleep or closing the lid
laptop goes to sleep after about 5 seconds, but instantly wakes again showing a black screen (touching the keyboard or moving the mouse shows the login screen one normally gets after wake)
login again, put laptop to sleep
latop stays in sleep mode
output of powercfg -lastwake after the first instant wake shows the audio controller is responsible. Why would that be, why only the first try, and how to fix this?
Wake History Count - 1
Wake History [0]
Wake Source Count - 1
Wake Source [0]
Type: Device
Instance Path: PCI\VEN_8086&DEV_1C20&SUBSYS_04461028&REV_05\3&11583659&0&D8
Friendly Name:
Description: High Definition Audio Controller
Manufacturer: Microsoft
When we provision users we set the "User must change password at next logon" flag and instruct them to go to OWA to login for the first time and change their password. Using the registry setting ChangeExpiredPasswordEnabled as explained here:
http://technet.microsoft.com/en-us/library/bb684904.aspx
worked well prior to SP2 installation. This allows users with 'expired' passwords to logon and forces a password change before they can access OWA. We just installed Exchange 2010 Service Pack 2 and now it's no longer working. Users with this flag set ('expired' passwords) can't login in at all unless we clear the flag.
FYI here's the registry key configuration as set now with SP2 installed:
Any suggestions as to how I might fix this? Or did MS break this feature in Service Pack 2?
I'm trying to retrieve video files from the IE 8 cache for a user that's not an admin in Win 7. As a non admin user, I run Explorer as admin and still can't see the temp internet files for the non admin user. Only if I login as a user that is admin can I see the files.
Is there any way I can see the files w/o having to go through the login process?
Essentially, I want the video file from this page and others like it: http://video.yahoo.com/watch/111585/1027823
I have some problem when I use Remote Desktop, here some description.
I set some application to autorun each time Administrator (console) was login on W2K3 SP2 server
I use Remote Desktop from XP SP3, using the same login as Administrator
It creates a new session with the same username and the application starts autorun which make duplicity in application
I just hoping i can enforce the Remote Desktop client to connect into only one session (console session), toying with Group Policy setting, successfully enforce the one session, but whenever i close remote desktop (disconnect) the console got disconnected too (which I didn't want it to behave like that).
I also try some setting to limit connection, still it doesn't behave as I want it too. Simple i just want to use 1 session, but each time we close remote desktop the session still alive, much like when we use VNC solution (RealVNC, UltraVNC, TinyVNC etc.)
Any solution(s)?
We're using Nagios to monitor some of our web sites. We have a script that uses the older plugin that we are trying to switch to using webinject.pl from cpan. When the script runs, it generates this error:
LWP::Protocol::https::Socket: SSL connect attempt failed with unknown error error:1407741A:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert decode error at /usr/local/share/perl5/LWP/Protocol/http.pm line 51.
It appears the web site does not support TLSv1 for https. If it matters, the site is a Cisco WebVPN. I've pointed the same script at a different site that does support TLSv1 and it seems to work fine.
My web search is coming up empty.
Successful connect:
<case
id="1"
description1="Metro Home Page"
description2="Metro, login test"
method="get"
url="https://metro.myco.com/index.php"
verifypositive="restricted"
logrequest="yes"
logresponse="yes"
sleep="1"
/
Failing connect:
<case
id="2"
description1="WebVPN Home Page"
description2="webvpn.myco.com login test"
method="get"
url="https://webvpn.myco.com/webvpn.html"
verifypositive="Authorized"
logrequest="yes"
logresponse="yes"
sleep="1"
/
I set up a website with my own custom PHP code. It appears that people from places like Ukraine are trying to hack it. They're trying a bunch of odd accesses, seemingly to detect what PHP files I've got.
They've discovered that I have PHP files called mail.php and sendmail.php, for instance.
They've tried a bunch of GET options like:
http://mydomain.com/index.php?do=/user/register/
http://mydomain.com/index.php?app=core&module=global§ion=login
http://mydomain.com/index.php?act=Login&CODE=00
I suppose these all pertain to something like LiveJournal?
Here's what's odd, and the subject of my question. They're trying this URL:
http://mydomain.com?3e3ea140
What kind of website is vulnerable to a 32-bit hex number?
Currently when we want to access an internal site from Internet (IIS with NTLM auth), we have two login screens that appear :
step1 : LDAPAuth, from the BlueCoat that check login/password validity against Active Directory
step2 : NTLM auth, from our application.
Is it possible to configure the reverse proxy to use the LDAP credentials provided at step1, and give them to whatever application that requests them ? Of course, if those credentials aren't valid, nothing happens.
We're using BlueCoat SG400.
Update : we're not looking for SSO where the user doesn't have to enter a password. We want the user to enter his domain credentials in the LDAPAuth dialog box, and the proxy to reuse it to authenticate against our application. Or any application that uses NTLM. We've only got 1 AD domain behind the reverse proxy.
From what I've gathered so far it's clear that running if statements in nginx should be avoided at all costs. Most of the examples I've found so far regarding specific page redirects involve multiple servers being used. But, isn't that a bit wasteful? I'm not sure, but I would think multiple servers to accomplish this would be somewhat slower then a single server when under heavy load.
My current server call is this:
server {
listen 10.0.0.60:80;
listen 10.0.0.60:443 default ssl;
#other code
}
What I want to do is redirect certain http requests to https requests. For example, I want /login/ and /my-account/ to always be forced to use SSL. If you're on /help/ though, I want that served over the default http.
Is there a way to accomplish this within a single server call? Or is there no downside to using 2 server calls to get this working? nginx seems to be under pretty active development and a lot of the older guides I've followed were from times when you couldn't listen to requests for port 80 and 443 within the same server call. But now that nginx has been updated to support that (I'm running 1.2.4), I'm wondering if there's a "best practice" way of handling this today.
Any help would be greatly appreciated.
EDIT:
I did find this guide:
http://redant.com.au/blog/manage-ssl-redirection-in-nginx-using-maps-and-save-the-universe/
and I updated my code as follows:
map $uri $my_preferred_proto {
default "http";
~^/#/user/login "https";
}
server {
listen 10.0.0.60:80; ## listen for ipv4; this line is default and implied
listen 10.0.0.60:443 default ssl;
if ($my_preferred_proto = "none") {
set $my_preferred_proto $scheme;
}
if ($my_preferred_proto != $scheme) {
return 301 $my_preferred_proto://mysite.com$request_uri;
}
It's not working though. When I change the default to https everything is redirected to SSL so it does somewhat work. But the redirect of /#/user/login is not redirecting to HTTPS. Any ideas? Also, is this a good way to go about this?
I have two machines at home, both XP Pro SP3. I have no domain controller, so they're both just in WORKGROUP.
How can I, using Windows Authentication, log into an instance of SQL Server running on the other machine?
Whenever I try it, it seems to try to login as 'Guest', even though I have entered the machine name (OTHER-DESKTOP), and login (OTHER-DESKTOP\otheruser) in the User Accounts Control Panel box.
It works fine if I use sql server name and password, so I know the server is running.
Any clues?
I need to run the latest version of Node and NPM on Windows. I installed Node 0.5.8 and downloaded the sources of NPM from GitHub. The steps I followed to install NPM were listed on its GitHub site but I have a problem running the following command:
node cli.js install npm -gf
but it fails with the following error message:
Error: connect UNKNOWN
at errnoException (net_uv.js:566:11)
at Object.afterConnect [as oncomplete] (net_uv.js:557:18)
System Windows_NT 5.1.2600
command "...\\Node\\bin\\node.exe" "...\\npm\\cli.js" "install" "npm" "-gf"
cwd ...\npm
node -v v0.5.8
npm -v 1.0.94
code UNKNOWN
I think that this is a problem because I need authentication at my proxy to connect to the Internet. But I found no way to tell the installer to use my credentials for login. Is there a possibility to provide my proxy IP and login information to npm installation maybe via command-line arguments?
I can provide the full log (but seems to have no more relevant information) using pastebin if needed.
I'm running Filezilla server on my dedicated windows 2003 server.
It uses its own user-access control system.
The Filezilla server service itself is running under the System user.
When I setup users within the FTP Server Administrator Interface, I do not need to setup equivalent users, or adjust permissions on folders to allow users to login.
Example:
I setup TestFTP user with password 'p'
I set the home directoy of TestFTP user to be e:/website
I verify that e:/website only has permission for the System and Admin accounts (right click - security in windows explorer)
TestFTP is able to login to the server just fine.
I'm OK with this (perhaps due to ignorance?).
Is it generally frounded upon to utilize a FTP Server such as FileZilla Server that bypasses the built-in UAC in this method?
If I wasn't clear enough, please let me know.
Windows xp pro OEM was installed on my machine,
Disk was failing so I cloned it to a new disk (larger one).
Now windows said that the hardware has changed significantly and I need to re-activate,
and I would gladly do (got the product number on a sticker on the machine) - only that for running the activation process I need to be logged-in, but when I try to login it just automatically logs me out again :(
I know my credentials are O.K. because I can connect to the machine remotely and also use sysinternals tools such as PsExec or PSList etc. on it from a remote machine by specifying user and pasword.
Login via safemode does not work any differently then in normal mode...
I tried to run rundll32.exe syssetup,SetupOobeBnk (as suggested in several places on the net) using PsExec but it did not seem to help...
Is there any way out of this evil circle? [ can't log in because not activated - cant activate because not logged in ]
I'm trying to debug some issues with my Mac. This machine is used as continuous integration server. It stops responding from time to time. I think it could be some software issue, since the machine is working (so i.e. it's not a kernel panic) - that is when I go to the server room I see the login screen and I can move the mouse. Unfortunately I can't login neither directly nor by VNC or SSH.
There is a nice tool that helps in debugging this type of problem called aTop. It's like top but with history. Unfortunately it's Linux-only software.
Is there any tool that is similar to aTop for OSX?
Possible Duplicate:
How do you run windows explorer as a different user?
Is it possible to start a Windows Explorer with the rights of another domain user?
I tried to do the following to start a Windows Explorer on my computer as my domain Administrator, but without success:
Right click on C:\Windows\explorer.exe to select Run as different user,
Enter the domain administrator credentials:
Domain\Administrator
************
The windows explorer session only opens with my current user rights (Domain\me).
The reason behind my question is that I want to change some folder rights on a domain shared disk and I need the Domain\Administrator user rights to do it.
Usually, I do it by login as Domain\Administrator on the server hosting the shared disk but I would like to be able to do it from my PC, logged as my current login (Domain\me).
EDIT
As seen in the linked posts, it is not possible anymore on Windows Vista or 7.
On Windows XP, the solution is to do:
runas /user:domain\username "explorer /separate"
I have an issue with Google Chrome freezing whenever I open the Bookmark Manager. Only that particular tab freezes, and I can still use the other tabs. No bookmarks appear, and I cannot type in the 'Search bookmarks' field.
This seems to be related with my logged in profile. If I change profile, it allows me to login. I've also tried to login with my profile on different computers using Chrome, and it also freezes.
However, I can still add bookmarks from the bookmarks tab. I just cannot use the Bookmark Manager. Any ideas what I can do? Is it possible to somehow export my bookmarks, reset the profile bookmarks (without losing other information like extensions etc), and re-import them?
Hello
i got this message when i try to login the file server "the trust relationship between this workstation and the primary domain failed "
can anyone help me
thanks
A working torrentflux setup seems to have gone broken after upgrading PHP to 5.3 and Postrgres to 9.2beta3 on a FreeBSD 8.2 server. The login screen will show up fine, but after clicking the login button, I get an error :
Fatal error: Call to undefined function pg_escape_string() in \
/usr/home/parker/tf/html/inc/lib/adodb/drivers/adodb-postgres64.inc.php \
on line 241
Seems to be an error with PHP and the pgsql php package. The phppgsql package itself is not totally broken because I'm using it to host database driven apps on this server. This is the first and only error I'm seeing from it.
How might I go about fixing this problem?
I checked this thread, but it did not solve my exact problem.
I need to run a script on when a connection is made across my network using windows remote desktop connection. The thread listed above works for the initial login, however, if I don't log out (which is necessary for some processes running on my network), then it wont run the script again the next time someone connects to the system using remote desktop connection. Previously we were using pcAnywhere to achieve this, however after running into some graphical issues with pcAnywhere, we have decided to move away from it to RDC.
For a little more information, we need to have an email sent out anytime a connection is made to particular machines. The login name will always be the same for those systems and we do not log off when closing the connection.