Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Shell Script for "Password Management" Post 303045513 by sea on Saturday 28th of March 2020 12:34:54 PM
Old 03-28-2020
I'd have a basic tryout-draft...
Where I 'currently' 'fail' using LUKS (properly ; cryptsetup) to "mount" an encrypted file to a folder.
Currently as in: havent looked at the file for five years and gave it one quick shot today before I had to leave.

As it is right now (fallback), it allows you to mount a file that will contain the password file (anything for that matter).

So, not yet encrypted, but at least not as a loose file.

But it will require sudo rights for your account / at least for mount.

So I'm not sure if it would be of help?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

No utpmx entry: you must exec "login" from lowest level "shell"

Hi I have installed solaris 10 on an intel machine. Logged in as root. In CDE, i open terminal session, type login alex (normal user account) and password and i get this message No utpmx entry: you must exec "login" from lowest level "shell" :confused: What i want is: open various... (0 Replies)
Discussion started by: peterpan
0 Replies

2. Shell Programming and Scripting

script that can give login password for "ssh" without involving STDIN

Hi Folks, I am writing a shell script that can logon to remote machine automatically. But, I am facing one problem. I am using "ssh" command in script and while login into remote machine it asks for passowrd and it stops for STDIN input for password. I want my script to supply password... (2 Replies)
Discussion started by: gydave
2 Replies

3. AIX

"too big" and "not enough memory" errors in shell script

Hi, This is odd, however here goes. There are several shell scripts that run in our production environment AIX 595 LPAR m/c, which has sufficient memory 14GB (physical memory) and horsepower 5CPUs. However from time to time we get the following errors in these shell scripts. The time when these... (11 Replies)
Discussion started by: jerardfjay
11 Replies

4. UNIX for Advanced & Expert Users

Customize "change password" in unix shell

I want to customize the "change password" through unix shell. when a user's password is expired and he/she logs into shell next time he/she will be asked to change his/her password. At this time when the user provides new password instead of unix doing the "password change" action I want to call my... (4 Replies)
Discussion started by: sharmanikhilesh
4 Replies

5. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

6. Shell Programming and Scripting

Passing username and password to a script running inside "expect" script

Hi I'm trying to run a script " abc.sh" which triggers "use.sh" . abc.sh is nothing but a "expect" script which provides username and password automatically to the use.sh script. Please find below the scripts: #abc.sh #!/usr/bin/expect -f exec /root/use.sh expect "*name*" send... (1 Reply)
Discussion started by: baddykam
1 Replies

7. AIX

How to use 'expect' to pass UID & Password to a "for loop" in shell script?

Friends, Need someone's help in helping me with the below requirement for a script: > For a list of servers(over 100+), I need to login into each of them(cannot configure password-less ssh) & grab few configuration details < I know, this is possible through expect programming in a simple... (2 Replies)
Discussion started by: thisissouvik
2 Replies

8. Shell Programming and Scripting

How to use 'expect' to pass UID & Password to a "for loop" in shell script?

Friends, Need someone's help in helping me with the below requirement for a script: > For a list of servers(over 100+), I need to login into each of them(cannot configure password-less ssh) & grab few configuration details < I know, this is possible through expect programming in a simple... (14 Replies)
Discussion started by: thisissouvik
14 Replies

9. Shell Programming and Scripting

Can someone please show me a very simple "expect" script to change password in Solaris please?

Ladies & Gents, Can one of you gurus please show me a very simple "expect" script to change the password in Solaris in a script, please? Nothing fancy, no error checking, no nothing. Just to change the password of a new user, it's all. Many thanks in advance. U guys have honestly earned my... (1 Reply)
Discussion started by: Hiroshi
1 Replies

10. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies
pumount(1)						      General Commands Manual							pumount(1)

NAME
pumount - umount arbitrary hotpluggable devices as normal user SYNOPSIS
pumount [ options ] device DESCRIPTION
pumount is a wrapper around the standard umount program which permits normal users to umount removable devices without a matching /etc/fstab entry. pumount also supports encrypted devices which use dm-crypt and have LUKS metadata. If a LUKS-capable cryptsetup is installed, pumount will umount the mapped device instead and call cryptsetup to close the decrypted device afterwards. pumount expects the device as its only argument. This will umount device from a directory below /media if policy is met (see below). Please note that, as with pmount, you can use labels and uuids as described in fstab (5) for devices present in /etc/fstab. In this case, the device name need to match exactly the corresponding entry in /etc/fstab, including the LABEL= or UUID= part. Important note for Debian: The permission to execute pumount is restricted to members of the system group plugdev. Please add all desktop users who shall be able to use pmount to this group by executing adduser user plugdev (as root). OPTIONS
-l, --lazy Lazy unmount. Detach the filesystem from the filesystem hierarchy now, and cleanup all references to the filesystem as soon as it is not busy anymore. (Requires kernel 2.4.11 or later.) IMPORTANT NOTES This option should not be used unless you really know what you are doing, as chances are high that it will result in data loss on the removable drive. Please run pumount manually and wait until it finishes. In addition, pumount will not luksClose a device which was unmounted lazily. --luks-force Normally, pumount will not luksClose (see cryptsetup(1)) a device pmount did not open. However, you can bypass this restriction with this flag. You probably will need it if you did mess around with the /var/lock/pmount_luks directory. -h, --help Print a help message and exit successfully. -d, --debug Enable verbose debug messages. --version Print the current version number and exit successfully. POLICY
The umount will succeed if all of the following conditions are met: o device is a block device in /dev/ (it does not need to exist if -l is supplied) o device is not in /etc/fstab (if it is, pmount executes umount device as the calling user to handle this transparently) o device is mounted according to /etc/mtab and /proc/mounts with the calling user's uid o mount point is in /media PUMOUNT AND MISSING DEVICES
pumount now supports unmounting devices that have gone missing for some reason, such as a brutal removal of the device, or a kernel/hard- ware problem. Just specify the mount point as argument for pumount. SEE ALSO
pmount(1), cryptsetup(1), umount(8) AUTHOR
pmount is developed by Martin Pitt <martin.pitt@canonical.com>. Martin Pitt August 27, 2004 pumount(1)
All times are GMT -4. The time now is 04:03 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy