Way to log out a FSU account in shell?

I'm looking for a way to log out a background user (Fast Switched User - FSU) who forgot to log out - from the terminal.
I know this is trivial in the *nix world, just killing a process probably; I just can't find the command to do it in Mac's flavor (I'm a casual *nix shell user)
BTW, I don't want the Prefs->Security->General "logout after inactivity" setting.... that logs out everybody (including me) and I can't have my account logged out (due to running processes).
these are the closest I have gotten so far but both have problems:
$osascript -e 'tell application "System Events" to log out'  <-- but this would log ME out.....
OR
kill -9 `ps -u <username> | grep -v PID | awk '{ printf ("%s ", $1); }'`    <---- this has a problem with the argument <username>  and I don't know how to fix it to test it.
Ideas on this are appreciated!
Thank you,
Jason

Thanks Linc -
but when I try this, it says "no matching processes were found".  I then tried
> ps -U /username/   (substituting real username of course)
and I don't see a logonwindow....
Any suggestions?

Similar Messages

  • I have aol email set up on my iphone4. Is there a way for me to log out of that account after use, so one one else in my family can read my emails?

    I have aol email set up on my iphone4. Is there a way for me to log out of that account after use, so one one else in my family can read my emails?

    Not easily, no. The better solution would be to put a passcode on the phone.

  • Is there a way to log out of my itunes or app store account without having the device?

    is there a way to log out of anitunes and app store account thats on a device, without having the device?

    It prevent using the account change the account password on another device

  • Cannot log out of gmail account

    My friend logged into her gmail account on my mac ( OX 10.4 )
    Now theres no way to log out. I already shut down and restarted computer but its still up.
    Where or how can I log out???

    Are you talking about the native mail app that came with the ipad?
    If so there is no log off feature, you simply close out of the mail app.

  • Itunes keeps not responding when i try to log out of my account

    itunes keeps not responding when i try to log out of my account
    I have tried uninstalling the itunes program and re Installing it but it has not worked,
    Is there anyone that can help me?

    Have you tried leaving it to hang for 5 minutes?

  • How can i log out of an account on my mail app on my computer

    how can i log out of an account on my mail app on my computer

    Mail > Preferences > Accounts > Account Information > Enable this account: uncheck

  • I keep getting an error when trying to update an app- cannot connect to store. I logged out from my account and tried to log back in and got the same error. I am doing all this from my phone since I no longer own a personal computer (only work)

    I keep getting an error when trying to update an app- cannot connect to store. I logged out from my account and tried to log back in and got the same error. I am doing all this from my phone since I no longer own a personal computer (only work) since I use iCloud and I tunes match

    YAY!!! Saved it in my Mac's Firefox Bookmarks for easy future access!
    Hope you are having a lovely afternoon today! I'm about ready to go bobo....I have an early meeting, and I don't want to oversleep! The nice part is that I work remotely, so I only have to wake up 15 minutes or so before the meeting.... I don't even use an alarm clock anymore (really, my iPhone alarm, which is much more pleasant), unless I have to get up at 6:30 or something....
    TMI?
    GB

  • Automatic log out of my account

    hi -
    my powerbook has begun quitting all applications and logging out of my account - all by itself! this usually happens when the computer is left open and I haven't touched it for some time.
    no, I have not configured any automatic, timed shut down sequence, and no, it is not family or collegues logging out for me. it also happens when I'm home alone.
    has anyone experienced the same?
    best,
    pryds
    PowerBook G4 17"   Mac OS X (10.4.7)  

    Go to System Preferences > Security and confirm "Log out after XX minutes of inactivity" is not selected.

  • My Macbook Pro's iTunes App was logged in as someone else. I logged out of that account and logged into mine, but I found that the app still shows all of the previous account's content. None of my apps, songs, or movies are there!

    My Macbook Pro's iTunes App was logged in as someone else. I logged out of that account and logged into mine, but I found that the app still shows all of the previous account's content. None of my apps, songs, or movies are there! iTunes 12.1.0.50 on OS X Yosemite version 10.10. Why is iCloud doing this, and how do I view my content again?

    MacBook Pro  / Mozilla Firefox / Netflix / Silverlight Update solved - DON'T DWNLOAD FROM NETFLIX
    I solved this problem tonight. I have a MacBook Pro with 10.5.8. I know, it's old. But I love my Netflix and I recently noticed that Firefox plays Netflix much better.  Then I suddenly got this message that I needed to download the latest Silverlight - it only takes 30 seconds! - WRONG.   However, after much searching, I finally did the steps in order and it worked.  
    This was after repeatedly downloading Silverlight from the Netflix site without success.  So here's what I did:
    1. Went to http://www.microsoft.com/getsilverlight/Get-Started/Install/Default.aspx
    2. Followed the directions. I felt like such an idiot for not doing it right before.
    3. Go to your hard drive and search for "Silverlight" to locate ANY existing Silverlight files: .dmg, etc.
        [also check your Libary/ Internet Plug-ins, but the above search is faster]
    4. Drag it all to the trash and empty it.
    5. Go back to the Get  Silverlight page and click on the Install on that page, not the Netflix site.
    6. Note the steps for Safari or Mozilla Firefox - I wanted Firefox, so I follwed those instructions.
    7. Once it's installed, close all the browsers and Restart that bad boy. Right away.
    8. Open a browser, go to Netflix and proceed to joyfully rot your brain with Netflix content. Yay!

  • Hi ! I got an iPhone 5 from someone who I don't know the real owner. Then I wanna change iCloud on it, but I don't know the password of owner. How can I log out that iCloud account without password ? Please help me, thank you

    Thank you, please help me !

    How can I log out that iCloud account without password ?
    You can't.
    Return the phone to whoever you bought it from and get a refund. Without the previous owners password you will not be able to enter your own iCloud acount, and when you update the phone, you won't be able to re-activate it as it will be locked to the previous owners account.
    You should've checked the phone was not locked to someone else's iCloud account BEFORE buying it.
    Instructions here: http://support.apple.com/kb/ht5818

  • How to log out my itunes account from all devices

    i think some one stole my password and is downloading paid apps from it i was just wondering how can i log out of my itunes account in all locations

    Why don't you just reset your password? Look here.
    http://support.apple.com/kb/HE36
    You need to log out of each account on the device itself. On the iPad Settings>Store>Tap your ID. That is not going to prevent someone that knows your ID and password from downloading apps. They are logged into your account on their own devices.
    Reset the password.

  • Computer logs itself into Root account after logging out of admin account

    I am experiencing a problem with my laptop logging itself into the root account. I recently started having my computer log itself out of my account if I was inactive for several minutes as a security precaution. However, now I frequently return to find my computer logged out of my account, but logged into the root account. The normal login window that appears when you log out of an account appears over the desktop of the root account. Any ideas how I can stop my computer from logging in like this and making my computer even less secure than it was before?

    if you create another administrator account, dose it have the same issue as the managed account? if it dose not, dose any programs open when you login as the new administrator account?

  • Cannot log out of an account

    One of four user accounts on my iBook G4 (10.3.9) has recently developed a problem: when you try to log out, you get the endlessly spinning beach ball. The only way out is shutting down the computer with the power button. The other three accounts continue to behave normally.
    Here is what I have tried:
    - making the account an administrator account, which didn't help;
    - running Disk Utility by booting the computer for the CD, which also didn't help (about a quarter of the way through, I receive the message "Disk Utility has lost its connection with the Disk Management Tool and cannot continue").
    I've looked through the forums and found nothing relevant. I would be grateful for your help.
    Michel Chaouli
    iBook G4   Mac OS X (10.3.9)  

    You may have to use the keyboard combination command, shift apple Q to logout then force quit the Finder to finish the job. You shouldn't have to do this though.
    If you have issues booting off the CD and then running Disk Utility, I would boot your iBook in Target mode on another laptop. (if you have access to one) Then from the other laptop run Disk Utility with repair disk and repair permissions. This may fix your issues. If not you may need to use DiskWarrior.
    Another option is, you could backup the data from the problem account to another hard drive or machine, then delete the account. Next create a new account and import the data back manually.
    PowerBook G4   Mac OS X (10.4.8)   MacBook Pro

  • How do I log out of one account on iChat and into another?

    I want to log out of AIM on ichat and into Skype, how do I do it?

    Hi,
    In iChat 3, 4 and 5  you can have multiple accounts set up in iChat > Preferences > Accounts.
    In iChat 3 it will display one AIM type Name (@mac.com  MobileMe or AIM Name) and one Jabber type plus the Bonjour Account if enabled (total of three Buddy Lists) as a Max.
    iChat 4 and 5 can sign in (Log in) to as many accounts as you want to, be they ones that log in to the AIM service or ones that use Jabber.
    Logging out can be done several ways.
    1) iChat > Preferences > Accounts
    Select  the Account and then Deselect the "Use this Account" option.
    2) In the iChat menu again > Accounts
    Select any Ticked account and it will log out and remove the tick (Selecting it again toggle it "On" (logged in)
    3) Click to highlight, bring to the Front any Buddy list
    Click and hold the Status Message
    Select Off Line
    4) If you have enabled the Menu Bar iCon in the iChat > Preferences  > General section then you can also use the Menu Bar icon menu once the Buddy list is  the front window.
    IF you want to use Skype and IChat at the same time this is possible (you just can't do a Video chat on both at the same time)
    You can Quit any app from it's named Menu (i.e the iChat Menu > Quit)
    Or Click and hold the DOCK Icon for the App and select Quit.
    You cannot use iChat to connect to Skype.
    7:36 PM      Monday; June 13, 2011
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb( 10.6.7)
     Mac OS X (10.6.7),
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

  • MBP won't log out of user account

    Hello,-
    My MBP won't log out of my user account.  It just sits at a white screen with the apple logo.  I have to reboot it (several times) to get back
    to my user accounts.
    I have done a disk repair and it worked fine for 2 days then back to issue.
    Any suggestions?

    If you don't already have a current backup, back up all data before doing anything else. This procedure is a diagnostic  test. It changes nothing, for better or worse, and therefore will not, in itself, solve your problem. The backup is necessary on general principle, not because of anything suggested in this comment.
    Third-party system modifications are a common cause of usability problems. By a “system modification,” I mean software that affects the operation of other software — potentially for the worse. The procedure will help identify which such modifications you've installed, as well as some other aspects of the configuration that may be related to the problem.
    Don’t be alarmed by the seeming complexity of these instructions — they’re easy to carry out. Here's a brief summary: In each of two steps, you copy a line of text from this web page into a window in another application. You wait about a minute. Then you paste some other text, which will have been copied automatically, back into a reply on this page. The sequence is copy; paste; paste again. That's all there is to it. Details follow.
    While investigating the problem, you may have started the computer in "safe" mode. If possible, these steps should be taken while booted in “normal” mode, not in safe mode. If you’re now running in safe mode, reboot as usual before continuing. If you can only boot in safe mode, you can still use this procedure, but not all of it will work. Be sure to mention that in your reply, if you haven't already done so.
    Below are instructions to enter UNIX shell commands. The commands are safe and do nothing but produce human-readable output, but they must be entered exactly as given in order to work. If you question the safety of the procedure suggested here — which you should — search this site for other discussions in which it’s been followed without any report of ill effects. I am not asking you to trust me. If you can't satisfy yourself that these instructions are safe, don't follow them.
    The commands will line-wrap or scroll in your browser, but each one is really just a single long line, all of which must be selected. You can accomplish this easily by triple-clicking anywhere in the line. The whole line will highlight, and you can then copy it.
    Note: If you have more than one user account, Step 2 must be taken as an administrator. Ordinarily that would be the user created automatically when you booted the system for the first time. Step 1 should be taken as the user who has the problem, if different. Most personal Macs have only one user, and in that case this paragraph doesn’t apply.
    Launch the Terminal application in any of the following ways: 
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.) 
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens. 
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid. 
    When you launch Terminal, a text window will open with a line already in it, ending either in a dollar sign (“$”) or a percent sign (“%”). If you get the percent sign, enter “sh” and press return. You should then get a new line ending in a dollar sign. 
    Step 1 
    Triple-click anywhere in the line of text below on this page to select it:
    PB=/usr/libexec/PlistBuddy; PR () { [[ "$o" ]] && printf '\n%s:\n\n%s\n\n' "$1" "$o"; }; PF () { o=$($PB -c Print "$2" | awk -F'= ' \/$3'/{print $2}'); PR "$1"; }; { o=$(( $(vm_stat | awk '/Pageo/{sub("\\.",""); print $2}')/256 )); [[ $o -gt 1024 ]] && printf "\nPageouts: %s MiB\n\n" $o; o=$(kextstat -kl | grep -v com\\.apple | cut -c53- | cut -d\< -f1); PR "Loaded extrinsic kernel extensions"; o=$(launchctl list | sed 1d | awk '!/0x|com\.apple|org\.(x|openbsd)|\.[0-9]+$/{print $3}'); PR "Loaded extrinsic user agents"; o=$(launchctl getenv DYLD_INSERT_LIBRARIES); PR "Inserted libraries"; o=$(crontab -l); PR "User cron tasks"; o=$(cat /e*/lau*); PR "Global launchd configuration"; o=$(cat ~/.lau*); PR "Per-user launchd configuration"; PF "Global login items" /L*/P*/loginw* Path; PF "Per-user login items" L*/P*/*loginit* Name; PF "Safari extensions" L*/Saf*/*/E*.plist Bundle | sed 's/\..*$//;s/-[1-9]$//'; o=$(find ~ $TMPDIR.. \( -flags +sappnd,schg,uappnd,uchg -o ! -user $UID -o ! -perm -600 \) | wc -l); [[ $o -eq 0 ]] || printf "\nRestricted user files: %s\n\n" $o; cd; o=$(find -L /S*/L*/E* {,/}L*/{A*d,Compon,Ex,In,Keyb,Mail/Bu,P*P,Qu,Scripti,Servi,Spo}* -type d -name Contents -prune | while read d; do ID=$($PB -c 'Print :CFBundleIdentifier' "$d/Info.plist"); ID=${ID:-No bundle ID}; egrep -qv "^com\.apple\.[^x]|Accusys|ArcMSR|ATTO|HDPro|HighPoint|driver\.stex|hp-fax|JMicron|microsoft\.MDI|print|SoftRAID" <<< $ID && printf '%s\n\t(%s)\n' "${d%/Contents}" "$ID"; done); PR "Extrinsic loadable bundles"; o=$(find /u*/{,*/}lib -type f -exec sh -c 'file -b "$1" | grep -qw shared && ! codesign -v "$1"' {} {} \; -print); PR "Unsigned shared libraries"; for d in {,/}L*/{La,Priv,Sta}* L*/Fonts; do o=$(ls -A "$d"); PR "$d"; done; } 2> /dev/null | pbcopy; echo $'\nStep 1 done'
    Copy the selected text to the Clipboard by pressing the key combination command-C. Then click anywhere in the Terminal window and paste (command-V). I've tested these instructions only with the Safari web browser. If you use another browser, you may have to press the return key after pasting.
    The command may take up to a few minutes to run, depending on how many files you have and the speed of the computer. Wait for the line "Step 1 done" to appear below what you entered. The output of the command will be automatically copied to the Clipboard. If the command produced no output, the Clipboard will be empty. Paste into a reply to this message. No typing is involved in this step.
    Step 2 
    Remember that you must be logged in as an administrator for this step. Do as in Step 1 with this line:
    PR () { [[ "$o" ]] && printf '\n%s:\n\n%s\n\n' "$1" "$o"; }; { o=$(sudo launchctl list | sed 1d | awk '!/0x|com\.(apple|openssh|vix\.cron)|org\.(amav|apac|calendarse|cups|dove|isc|ntp|post[fg]|x)/{print $3}'); PR "Loaded extrinsic daemons"; o=$(sudo defaults read com.apple.loginwindow LoginHook); PR "Login hook"; o=$(sudo crontab -l); PR "Root cron tasks"; o=$(syslog -k Sender kernel -k Message CReq 'error|GPU |hfs: Ru|I/O e|find tok|n Cause: -|NVDA\(|pagin|timed? ?o' | tail -n25 | awk '/:/{$4=""; print}'); PR "Log check"; } 2> /dev/null | pbcopy; echo $'\nStep 2 done'
    This time you'll be prompted for your login password, which you do have to type. Nothing will be displayed when you type it. Type it carefully and then press return. You may get a one-time warning to be careful. Heed that warning, but don't post it. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator.
    You can then quit Terminal.
    To prevent confusion, I'll repeat: When you type your password in the Terminal window, you won't see what you're typing.
    Note: If you don’t have a login password, set one before taking Step 2. If that’s not possible, skip the step.
    Important: If any personal information, such as your name or email address, appears in the output of these commands, anonymize it before posting. Usually that won't be necessary.
    Remember, Steps 1 and 2 are all copy-and-paste — type only your password. Also remember to post the output.

Maybe you are looking for

  • "212 - Rejeicao: Data de emissao NF-e posterior a data de recebimento"

    Bom dia, Estou com o seguinte cenário. Usuário está tentando emitir nota e está ocorrendo o erro "212 - Rejeição: Data de emissão NF-e posterior a data de recebimento". Usuário está em Porto Velho - Rondônia que é uma hora a menos em relação a Brasíl

  • Network printing slow after updating to Tiger, InDesign from OS 9 PageMaker

    Sorry for the "old" OS talk, but this is "new" to this shop (a small newspaper). Long overdue, I upgraded our 8 G4s to Tiger from OS 9. They're all networked to a G5, where all files are stored (graphics mostly). This G5 was installed a year ago with

  • Setting timeout for webservice

    hello all, I have made client program to connect to a webservice using dynamic url, my problem is i am unable to set the timeout of the webservice if anybody knows please let me know. my code is as follows. WebServiceClient ann = testpackage.TestClas

  • How can I make mp4 videos play in Firefox?

    YouTube works fine. Other websites play videos, no problem. But then I'll go to a website and see a message that the video is either corrupt or is not supported. When I search for how to play mp4 in Firefox I end up at this site: http://www.jwplayer.

  • Logic Nope With G4 Mac Mini (Non-gigabet version)

    Does anyone know if that will work? One of the genius' at the apple store said I need gigabit and the only thing I could do was to buy a new Intel Core Duo Mac Mini. (Oh BTW, does anyone have predictions on when the Mac Mini will go core 2 duo) Does