I'm running cygwin bash on Windows 8.1. I would like to to write a OS neutral bash script that uses the commands like lock, block and unlock.
Do I need to write lock, block and unlock myself in C++?
I'm hoping someone has already written them.
My bash script would look something like this:
It seems to me someone should have written these commands a long time ago and made them available to perl, bash, python, ruby... programmers. Can anyone tell me where to get these programs?
how can I lock my keyboard while I'm away from the computer without using lock command. What other commands gives me the option to lock keyboard device?
thanks (7 Replies)
When I want to use the editor ,whether vi or textedit,it prompts for entering a key. How can I disable this function?many thanks for offering solutions! (1 Reply)
I only able to lock user ID with passwd -l username
It seems there is no option for me to unlock ID in solaris?
Is there any command as below?
passwd -u username
Appreciate someome can share with me the way to do it. (1 Reply)
When I do HMC upgrade, I download HMC code from IBM web site and burn it to a DVD disk, when I get the first DVD out of HMC's dvd rom and input the second DVD, it shows error:
The requested device is already locked by the process: Install Corrective Service.
Would you like to try to request a... (2 Replies)
We have two processes, one which copies a control file into a folder and another which is polling this folder and reading the control files.
Sometimes they clash and the reader fails because the copy is still happening.
We have been told that we should change the copy to a move because the... (1 Reply)
Hello all,
If anyone has time, I have a few questions:
How do I do the following in Linux. We are using Red Hat and Oracle Enterprise Linux, which is based on Red Hat too.
1. How to lock the account after a few (like 3) invalid password attempts?
2. How do you lock a screen after 30... (1 Reply)
Hi all,
I have to test some user priviliges. The goal is to be sure that an unauthorized user can't restart some modules (ssh, mysql etc...).
I'm trying to automate it with a shell script but in same cases I got the syslog broadcast message.
Is there any way to simply get a return code... (3 Replies)
Requirement:First i need to unlock the directory which i had a script for it.If i select app1 it should unlock the directory and after chnages in the script once need to lock the directory with lock command
The below highlighed variables in lock and unlock has to be changed according... (2 Replies)
I use Debian default encryption disk encryption. Only /boot it's not encrypted. When I boot I need to type my password, and then I will be logged in. But now I can't login. It always says that I typed the wrong password, but I typed the correct password.
I tried to boot in live-CD and try unlock... (3 Replies)
Discussion started by: zognadal
3 Replies
LEARN ABOUT OSF1
lock_init
lock_init(9r)lock_init(9r)NAME
lock_init - General: Initializes a complex lock
SYNOPSIS
#include <kern/lock.h>
void lock_init(
lock_t lock_structptr,
boolean_t can_sleep );
ARGUMENTS
Specifies a pointer to the complex lock structure, lock. The lock structure is an opaque data structure; that is, its associated members
are referenced and manipulated by the operating system and not by the user of the complex lock mechanism. Specifies a Boolean value that
indicates whether to allow kernel threads to block (sleep) if the complex lock is asserted. You can pass to this argument only the value
TRUE (allow kernel threads to block if the lock is asserted).
DESCRIPTION
The lock_init routine initializes a complex lock. You identify this lock by declaring a pointer to a complex lock structure and passing it
as the first argument. The complex lock structure pointer must be initialized before you can assert read and write operations on the com-
plex lock.
RETURN VALUES
None
FILES SEE ALSO
Routines: lock_done(9r), lock_read(9r), lock_terminate(9r), lock_try_read(9r), lock_try_write(9r), lock_write(9r)
Data Structures: lock(9s)lock_init(9r)