Decrypt  "/etc/shadow" file for user

Hi All
I want to write a script that give's a user access to kill his own processes. But to authenticate him I want him to log into this program with his unix user and password. How do I decrypt his password from the /etc/shadow file, or it there is a better way to do this I'm open for suggestions.
Many thanks in advance.
Kind Regards
Johnny

This sounds like a good excuse for you to look into RBAC and setup a role specifically for this purpose. This role would be given permission to run the pkill command using the -U switch to specify the UID to kill. But the more I think about this approach, the more problems I see with creating a role for this e.g. how do you prevent a user from killing someone else using this role cuz the role will have no way to truely know a specific user is supposed to be killing anything. But you may be able to think long and hard about this and figure something out.
A better approach might be for you to update the login logic you are already using. If the login logic sees that a user is already logged in twice, it puts up a screen showing the PPIDs of the process trees that the user is already logged into - obviously NOT showing the PPID of the current login session e.g. the one currently being used to kill the other login sessions.
The user can then selects which session to terminate. The login logic runs pkill to kill the selected PPID for that user. This "kill" login session is immedately exited and the user can login again with a clean session.
In this case, the user would have no reason to log into a second login which would then have to "login" again to kill a user's own processes.

Similar Messages

  • How to recover /etc/passwd and /etc/shadow files

    hi
    Unfortunetly I have a big problem is that someone crash the /etc/passwd and /etc/shadow files from my running server, and my all users are not to able to login. so please can any one help me how to recover this files or any ideas for make these files...
    thanks
    Mohammed Tanvir

    Hello
    It is not working.Pla help me this bit critical
    Step followed
    01.Boot from the cdrom and mount root partision.
    02.Deleted the exsisting file /etc/passwd and /etc/shadow
    03.copy the opasswd and oshadow to the etc directory as passwd and shadow
    04.Umount the root partision
    05.Reeboot the system
    thanks
    Roshantha

  • Received empty inbound container file for user

    Hi,
    I'm using WebAS 6.40 SP9 and a MI client JSP SP9.
    All step of the Configuration Guide have done (jobs, roles, propertie-file, etc.).
    Now, I get errors while synchronizing (log shown below)
    and my client gets no device id. Till now I havn't
    synchronized succesfully.
    Synchronization Log:   
    • Synchronization started. 
    • Connection set up (without proxy) to: http://osc-08:50000/meSync/servlet/meSync?~sysid=OS8& 
    • Successfully connected with server. 
    • Processing of inbound data began. 
    <b>• Received empty inbound container file for user (SHARED) 
    • Received empty inbound container file for user MISYNC00 </b>
    Trace File:
    [20050125 15:21:28:711] D [MI/Smartsync ] User has not been installed on MW, it is not ready for sync :MISYNC00
    The testing link:
    http://osc-08:50000/meSync/servlet/meSync?sysid=OS8&login=MI_CLIENT&password=MIPASS&client=010&language=en&acknoledge=X&~test=TRUE
    brings this answer:
    &WAF_SYNC&STATUS=&Execution Time= & HeaderType = MEREPLICATION &MORE_PACKAGES_WAITING = &
    I hope that you can help me. What is my problem?
    Do you need more stuff?
    Best regards,
    Marcel

    Hi Marcel,
    one question: Did you receive a device ID (you can see that on the settings page).
    If not, run transaction <b>MEREP_PD</b> on the WebAS. (Yes, just run this transaction and you do not need to do anything else). It is necessary to run this step because it will initialise the number range for the Mobile ID for the mobile client to use. For further explanation, check OSS Note 592284.
    Hope this helps, alex

  • Store Critical: Unable to read index file for user/mailtest: System I/O err

    more imap
    [27/Nov/2007:13:36:52 +0800] e69-1-c imapd[5984]: Store Critical: Unable to read index file for user/mailtest: System I/O error. Administrator, check server log for details.
    [27/Nov/2007:13:36:52 +0800] e69-1-c imapd[5984]: Store Critical: Unable to read index file for user/mailtest/&V4NXPnux-: System I/O error. Administrator, check server log for details.
    [27/Nov/2007:13:36:52 +0800] e69-1-c imapd[5984]: Store Critical: Unable to read index file for user/mailtest/&XfJT0ZAB-: System I/O error. Administrator, check server log for details.
    [27/Nov/2007:13:36:52 +0800] e69-1-c imapd[5984]: Store Critical: Unable to read index file for user/mailtest/&g0l6Pw-: System I/O error. Administrator, check server log for details.
    [27/Nov/2007:13:36:52 +0800] e69-1-c imapd[5984]: Store Critical: Unable to read index file for user/mailtest/test: System I/O error. Administrator, check server log for details.
    [27/Nov/2007:13:36:52 +0800] e69-1-c imapd[5984]: Store Critical: Unable to read index file for user/mailtest: System I/O error. Administrator, check server log for details.
    [27/Nov/2007:13:36:54 +0800] e69-1-c imapd[5984]: Store Critical: Unable to read index file for user/mailtest: System I/O error. Administrator, check server log for details.
    [27/Nov/2007:13:36:54 +0800] e69-1-c imapd[5984]: Store Critical: Unable to read index file for user/mailtest/&V4NXPnux-: System I/O error. Administrator, check server log for details.
    [27/Nov/2007:13:36:54 +0800] e69-1-c imapd[5984]: Store Critical: Unable to read index file for user/mailtest/&XfJT0ZAB-: System I/O error. Administrator, check server log for details.
    [27/Nov/2007:13:36:54 +0800] e69-1-c imapd[5984]: Store Critical: Unable to read index file for user/mailtest/&g0l6Pw-: System I/O error. Administrator, check server log for details.
    [27/Nov/2007:13:36:54 +0800] e69-1-c imapd[5984]: Store Critical: Unable to read index file for user/mailtest/test: System I/O error. Administrator, check server log for details.
    [27/Nov/2007:13:36:58 +0800] e69-1-c imapd[5984]: Store Critical: Unable to read index file for user/mailtest: System I/O error. Administrator, check server log for details.
    [27/Nov/2007:13:37:00 +0800] e69-1-c imapd[5984]: Store Critical: Unable to read index file for user/mailtest: System I/O error. Administrator, check server log for details.
    [27/Nov/2007:13:37:00 +0800] e69-1-c imapd[5984]: Store Critical: Unable to read index file for user/mailtest/&V4NXPnux-: System I/O error. Administrator, check server log for details.
    [27/Nov/2007:13:37:00 +0800] e69-1-c imapd[5984]: Store Critical: Unable to read index file for user/mailtest/&XfJT0ZAB-: System I/O error. Administrator, check server log for details.
    [27/Nov/2007:13:37:00 +0800] e69-1-c imapd[5984]: Store Critical: Unable to read index file for user/mailtest/&g0l6Pw-: System I/O error. Administrator, check server log for details.
    [27/Nov/2007:13:37:00 +0800] e69-1-c imapd[5984]: Store Critical: Unable to read index file for user/mailtest/test: System I/O error. Administrator, check server log for details.

    whr25 wrote:
    root@e69-1-c # ./imsimta version
    Sun Java(tm) System Messaging Server 6.3-0.15 (built Feb 9 2007)
    libimta.so 6.3-0.15 (built 19:27:56, Feb 9 2007)
    SunOS e69-1-c 5.10 Generic_118833-24 sun4u sparc SUNW,Sun-FireThis is an old release of 6.3, you should be planning to upgrade to proactivly prevent known bugs.
    prstat
    2255 mailsrv 407M 310M sleep 59 0 0:00:44 0.0% imapd/3Not 3GB. Of course if you had just restarted messaging server as you noted below then that isn't unexpected.
    I'm restart Messaging Server,I't is not problem
    This issue is about two days after the RuningWhen the problem does occur what is the prstat output? The size of the imapd processes will increase over-time depending on the number of people accessing the store via IMAP, and the size of the mailboxes (store.idx files) they are accessing.
    Regards,
    Shane.

  • In HTTP log:  Store Critical: Unable to read index file for user/ uid

    All:
    Sun Java(tm) System Messaging Server 6.2-7.05 (built Sep 5 2006)
    libimta.so 6.2-7.05 (built 12:18:44, Sep 5 2006)
    We recently have started to see the following errors in our http logs:
    [01/Mar/2007:13:03:43 -0500] httpd[5174]: Store Critical: Unable to read index file for user/<uid>: System I/O error. Administrator, check server log for details.
    It's occurring a couple of different times during the day to certain users. Then it won't happen for days to anyone, but then start up again. I saw a similar thread to this re: IMAP and I'm curious if http could be having the same problem. We increased the number of process of http (from 2 to 4 a few months ago) but kept the same maxsessions (6000), so maybe I need to change the maxsession to something lower? We only started to see the I/O error two weeks ago We're not seeing the error in imap logs. Also there's no errors in the default log related to the users that receive this in http.
    I'm planning on running a reconstruct -m in the mean time to see if that helps. There have been no changes to the server or application for quite some time. Any thoughts?

    Yes, http can have the same issue. Yes, lowering the maxsessions from 6000 is the answer, IF it's the same problem. Likely, but not guranteed.
    If you actually look at the store.idx for that particular user, what do you see? Is it near 2 gig? If so, then the user needs to either delete some messages or move some to another folder, as 2 gig is the limit for the store.idx file.....
    jay

  • CSV file for users who have one-time password email address

    Hi Guys,
    I am trying to extract the list of users who have one-time password email address in FIM or users who have registered with one-time password reset authentication workflow. I need to get their email addresses in CSV file.
    Regards
    Sarwar
    Sarwar

    Take a look at:
    http://social.technet.microsoft.com/wiki/contents/articles/3616.how-to-use-powershell-to-export-all-users-who-have-registered-for-self-service-password-reset-sspr.aspx
    The script queries a WorkFlow called "Password Reset AuthN Workflow" and returns its ObjectID, then uses it to do a new query searching for "Users" with these parameters:
    AuthN WorkFlow Registered = ObjectID of "Password Reset AuthN Workflow"
    The script exports these details to a CSV.
    Also, all OTP email addresses should be stored in the "msidmOneTimePasswordEmailAddress" attribute in the FIM Portal.

  • Server side creation of pdf files for users

    Im looking for a way for users of my website to save their data as a .pdf file on their hard drive.  I want to be able to do this seemlessly for them on my end and not require them to have a client-side .pdf creator like PrimoPdf of something similar.
    Is there a way to do server-side pdf file creation for my users?
    Thanks!
    PS: This is a Java website and a linux server.

    You could utilize Apche FOP (http://xmlgraphics.apache.org/fop/) project for that purpose.
    In my company we've used that to convert IBM Lotus Notes documents into PDF via some XML/XSL intermediate layer.
    On the other hand - while in theory you could run Acrobat Pro on your server in embedded mode and call that server via some layer even from Java clients - I think that is not allowed by Adobe Acrobat Pro license. If you could run it embedded on your server - then you could try to prepare your specific plugins for it with Acrobat SDK and then you'll achieve what you need in required PDF creation.

  • Help files for users

    I'd like to provide a help facility for users of the desktop programs I'm developing. The last item on the Menu Bar should be Help, and the first item on that menu should lead to instructions on how the program works.
    I find it curious that in the tutorials and textbooks I have researched, I haven't found any mention of a Help File System. Is there no standard Java way of presenting user help information?
    One obvious solution is to place the information in a set of HTML files. But the missing link is invoking the browser from within a Java desktop application. I've discovered how to do that in Windows using rundll32, but that's implementation dependent. Is there a standard way of asking the default browser to display a given URL?

    As cotton says, one can use JavaHelp to provide help information.
    Perhaps an easier but dirtier way is to display some information such as an HTML-based help file in a JEditorPane.
    Depends on how professional you want your help to look like.

  • Modifying .PRM file for user defined database functions

    Hi,
    Currently we have the BOXI 3.1.8 Universe in oracle database and we are planning to migrate to SQL server 2008.And the universe contains few oracle functions and user defined functions in the universe objects.
    In the way of migration we are planning to have both Oracle and SQL Server database connecting to single universe. To make the universe generic we have identified the objects using user defined functions and trying to push it to the database.
    Since there are a few differences in the way oracle and SQL Server functions are invoked, we have decided to edit the .PRM files available in the path D:\Business Objects\BusinessObjects Enterprise 12.0\win32_x86\dataAccess\connectionServer\jdbc , so that we have a common way of invoking the functions.
    Invoking functions:
    SQL Server : <SchemaName>.<function>
    Oracle: <function>
    1.Is there any problem if I edit the .PRM?
    2.Whether these changes will work fine?
    3.Whether the reports will run fine if I use those objects in the reports?
    Thanks,
    Lavanyaa

    Hi Lavanyaa,
    The PRM files actually state the functions that are normally available in a database, including the standard format.
    They are what drives the list of functions available when you build the SELECT definition or CONDITION definitions in Information designer... The fact that a function needs aggregation or/not is also determined in there.
    However:
    The SQL that you provide in the universe is what will be sent to the database and that must be 'understood' by the database.
    So it's not as simple as changing the PRM file and you will be able to speak 'universal' SQL in your universes.
    Fortunately:
    That complexity is taken away from you when you create a multisource database.
    You will speak 'data federator' SQL in the universe. Data federator will take care of translating it to the right syntax for each database. Notice you will probably need some customization to determine how a SQL will be handled when you need to query two databases, as the default is not automatically the best way performance wise.
    Hope this helps,
    Marianne

  • Import File for Users/Phones

    What is the file format for importing users and phones into BE3000?

    Mario,
    I have posted it here: https://supportforums.cisco.com/docs/DOC-26880
    Thanks

  • Where can I find log files for users logging into network homes?

    We're running an open directory master and are using AFP on another server to host our network homes.  I was asked to find a log of users logged into their network homes on a specific date and I'm starting to wonder if that's actually a log that exists.  I've checked the OD logs and in one of the password logs I can see users have authenticated but it doesn't say specifically to what (so it just lists they logged into something).  The AFP logs just show specific files being accessed without usernames.  So what am I missing?  What log would I check?
    Thanks for your help!!

    File Zilla is a dedicated ftp client that you use to upload your published web site to your server.
    I would suggest that you perhaps consider using Cyberduck instead as this might be easier.  Cyberduck is a dedicated ftp client in the same way that File Zilla is.
    To be able to upload what you need is your published website.  Open iWeb and select the site that you want to publish and then select publish to a local folder and your site will then be published to your desktop.  You then upload this to your server using Cyberduck or File Zilla.

  • Stop reading file for user prompt

    Reading from file and writing to binary tree, I need to implement input check. Say if word in the file is not in the tree, I want to prompt user to correct or skip this input.
    The problem is that I'm using GUI (frame with couple of buttons and text field) and I want user to click one of the buttons in order to respond to the request, and stop reading from file unless response is received.... Any ideas how to do this?

    Check out the javadocs on BufferedReader. You should be able to read in a line at a time store it in a buffer and search it for whatever your looking for.There is also a mark method which will let you store your current offset in the file and return to it. Then you can use JOptionPane to display a Yes/No dialog box to prompt the user if the word can be skipped. BufferedReader also has a skip method that will allow you to specify how many chars to skip.
    Hope this helps
    Justin

  • Migrating Linux shadow-file MD5 passwords to Sun DSEE for Solaris/SunMail

    Hello all,
    We are about to undertake migration of an outdated mail server based on RedHat 7.2 and Sendmail/ipop3d to Sun Messaging Server (JCS6u2). While the filesystem/mail are not a problem, we're stuck at the question of how to best migrate old users' identities.
    The old Linux system used user names and password hashes stored in /etc/passwd and /etc/shadow files. Hashes are mostly MD5 and a few seem like crypt.
    Question is: are there known incompatibilities between password hashes (algorithms, expected format) in Linux and Sun products - Solaris/DSEE/SunMail?
    That is, if we just take strings like these:
    usemd5:$1$Wu7IqFT5$TeUht3OMdeSSBB3Vab4dB.:11262:0:::::134540116
    usecrypt:DD2kEwCD8nies:10220::::::
    Can we simply place the second column as the userPassword attribute in Sun DSEE and expect that users would be able to log in to LDAP-enabled Solaris and Sun Mail with their old passwords knownst only to them?
    If not, is there some simple modification/translation of such hashes to a format accepted by Sun products?
    Or are these formats/algorithms known to be incompatible somehow in a fatal manner, so our only option would be generation of new passwords for Sun DSEE and its clients?
    Thanks,
    //Jim

    Just to reclarify or throw more information:
    a password - cleartext value - testuser1 has 32-digit HEX value as - 41da76f0fc3ec62a6939e634bfb6a342
    Same password when converted to Base64 pattern becomes - Qdp28Pw+xippOeY0v7ajQg==
    But when I use pwdhash utility in DSE after configuring CRYPT to use MD5 hashes it becomes -
    {crypt}$md5$$LiB/H70zXr3xfQPoXVuUQ1
    I used below command :
    pwdhash -D /opt/SUNWdsee/dsee6/ds6/slapd-oha-dev -s CRYPT testuser1
    Actual hash value of pwdhash is -LiB/H70zXr3xfQPoXVuUQ1 with rest of the prefix is to meet RFC standard and salt and algo name separator.
    I am wondering if Sun MD5 default uses any salt even when I haven't used or DS does it. Or if any other MD5 option is there which can be used.
    Thanks,
    Gaurav

  • Migrating /etc/shadow from *nix to OS X?

    Is it possible to migrate users from Linux/Unix to OS X? I really just need some way to merge a traditional /etc/shadow file with /var/db/shadow Since both are hashed via separate ways, I'm sure there's no "just copy it here".
    I've seen a few re-written userlands on sourceforge that would enable the normal use of /etc/shadow on OS X, this can't be the only solution...
    Thanks for reading or responding!

    There isn't any method I'm aware of.
    The problem is that the passwords are not stored in these files - they only store a hashed/encrypted version of the password. When a user logs in, their password is encrypted using the same algorithm and then compared to the shadow file. If the encrypted versions match then the authentication succeeds.
    In this way the shadow file doesn't need to store the actual password, which enhances security, but it also makes it impossible to migrate the passwords to a different system since you cannot retrieve the original password from the shadow file.
    As a result I don't think there's any way to migrate passwords via this file. If you're migrating your users to a new directory server then you probably have to give them new passwords.

  • /etc/shadow

    Hi;
    user1:LK:::::::, this is in /etc/shadow file. what does this mean?
    a. The system administrator has locked the account.
    b. A new account and no password has been set for the account.
    c. The account has been locked after too many failed login attempts.
    WHICH IS CORRECT a or b or c?

    passwd -l <username> can do this --> a
    useradd <user> and not setting a passwd can do this --> b
    and if account lockout is configured, that is valid as well. see [http://blogs.sun.com/gbrunett/entry/solaris_10_account_lockout_three] --> c

Maybe you are looking for

  • Please clarify on these queries(tricky questions)...Waiting for Help

    Hi Guys, Can you please clarify me on the below queries please,these are all like Trickey questions {color:#000080}*1)How to Design a datastructure that will hold <{color:#800080}value,key{color}>, if you give the value it will return key.* *2)If we

  • Menus not encoding right?

    In DSP 2.0, the motion backgrounds of my menus suddenly stopped rendering in the menu viewer, when I do simulator, and when I render to disc. Also, when switching between different menus to work on them, it takes forever to switch. I'd say about 5-10

  • Profit centre clearing account.

    Hi Experts, Please tell me what is profit centre clearing account. What is the purpose of profit centre clearing account. Our client is having say plant A and B. COmpany Code 1. Profit centre is for Plant A and profit centre for plant B and one commo

  • Where to download an older version of pages?

    I need to dowload a version of pages that works with OSX 10.6.6., i.e. Snow Leopard. Ho

  • BAPI to update XREF3 in FB01

    Hi Gurus, Do you know some BAPI that can be use to update XREF3 field or the Reference Key 3 in FB01 using  (inbound) IDOC? Thanks!