Sponsored Content
Full Discussion: validating userid
Top Forums UNIX for Dummies Questions & Answers validating userid Post 35817 by oombera on Wednesday 7th of May 2003 03:52:40 PM
Old 05-07-2003
This will also make sure the first character is not a space..
Code:
echo $userid | grep -Eq '^[[:alpha:]][[:alnum:]]{5,9}$'
if [[ $? -eq 0 ]]; then
 ..
fi


Last edited by oombera; 05-07-2003 at 05:58 PM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

date and userid

Hi I am trying to write a script to check the log files for the trancactions based on usr input date and user input user id. I will take the user input userid and user input date and check there are any creation deletion happened, if so mail it other wise say no transactions; I got user... (2 Replies)
Discussion started by: gundu
2 Replies

2. Solaris

locking userid to 1 dir?

Hey guys, I need to set up some userid's on Solaris. These userid's will be used to view log files, so I will make the home dir /var/tmp. Is there anyway to make this the only dir that the id has access to? I know about chmod, and short of going thru every file on the box to make sure there is... (2 Replies)
Discussion started by: amheck
2 Replies

3. UNIX for Advanced & Expert Users

userid

I would like to know the difference between the real user-id and the effective user-id. If user-A runs a program owned by user-B then which is the real user-id and which is the effective user-id ? (1 Reply)
Discussion started by: sundaresh
1 Replies

4. Shell Programming and Scripting

Increment userid in file

Hello, does anyone know how to increment a userid(number) written in any scripting language that works on a shell? For example: I have a HTML file in this format: userid: name: telephone: Every time I execute my script it adds the same fields, except with the userid incremented. Like... (2 Replies)
Discussion started by: dejavu88
2 Replies

5. Shell Programming and Scripting

validating the userid and passwd

Hi i need to write a script which perform some action only when an existing and privliged user is running it. It will call another script where user ID and password are required. So in main script before calling another script I need userID and password validation....for that I can check... (0 Replies)
Discussion started by: ashish_uiit
0 Replies

6. Red Hat

userid with nothing to do on the os/app

Hi All, I got this userid apache with the same userid and groupid and /sbin/nologin and the /www/a home folder is empty. Can I just delete this userid? How can I investigate if userid have something to do with the application? Thanks for any comment you may add. (1 Reply)
Discussion started by: itik
1 Replies

7. Shell Programming and Scripting

What is the command to get name associated with userid?

Hi, 1#what is the command to get name associated with userid? 2#I am using unix on Mainframes thru OMVS. So any one know to to capture TSO command output to a variable on OMVS environment. I tried with below script, but its not working! #!/bin/ksh output=$(tso whois PA1234) echo... (6 Replies)
Discussion started by: prashant43
6 Replies

8. UNIX for Dummies Questions & Answers

touch -t time, using different userid

Hi, I am reciveing files from a remote system on my linux box. These files are named based on time, which I can use to 'touch' the time . I can access/modify these files using my id. but when I tried touching time using my id I am getting error; touch -t 1001261234 1001261234_job2333... (15 Replies)
Discussion started by: rajivbravo
15 Replies

9. Solaris

See who is logging in with a userid

Hi all. Quick question. How can I tell if someone is logging in to our unix servers with an application id and not their personal id? Thanks (2 Replies)
Discussion started by: jamie_collins
2 Replies

10. UNIX for Dummies Questions & Answers

userid and pw

questions: a. where can I customized the password of userid in solaris? say I wanted 10digits long, all caps? thanks (4 Replies)
Discussion started by: lhareigh890
4 Replies
LMTPTEST(1)						      General Commands Manual						       LMTPTEST(1)

 *

NAME
lmtptest - interactive LMTP test program SYNOPSIS
lmtptest [ -t keyfile ] [ -p port ] [ -m mechanism ] [ -a userid ] [ -u userid ] [ -k num ] [ -l num ] [ -r realm ] [ -f file ] [ -n num ] [ -c ] [ -i ] [ -o option=value ] [ -v ] hostname DESCRIPTION
lmtptest is a utility that allows you to authenticate to a LMTP server and interactively issue commands to it. Once authenticated you may issue any LMTP command by simply typing it in. It is capable of multiple SASL authentication mechanisms and handles encryption layers transparently. This utility is often used for testing the operation of a lmtp server. Also those developing LMTP clients find it useful. OPTIONS
-t keyfile Enable TLS. keyfile contains the TLS public and private keys. Specify "" to negotiate a TLS encryption layer but not use TLS authentication. -p port Port to connect to. If left off this defaults to lmtp as defined in /etc/services. -m mechanism Force lmtptest to use mechanism for authentication. If not specified the strongest authentication mechanism supported by the server is chosen. -a userid Userid to use for authentication; defaults to the current user. This is the userid whose password or credentials will be presented to the server for verification. -u userid Userid to use for authorization; defaults to the current user. This is the userid whose identity will be assumed after authentica- tion. NOTE: This is only used with SASL mechanisms that allow proxying (e.g. PLAIN, DIGEST-MD5). -k num Minimum protection layer required. -l num Maximum protection layer to use (0=none; 1=integrity; etc). For example if you are using the KERBEROS_V4 authentication mechanism specifying 0 will force lmtptest to not use any layer and specifying 1 will force it to use the integrity layer. By default the maximum supported protection layer will be used. -r realm Specify the realm to use. Certain authentication mechanisms (e.g. DIGEST-MD5) may require one to specify the realm. -f file Pipe file into connection after authentication. -n num Number of authentication attempts; default = 1. The client will attempt to do SSL/TLS session reuse and/or fast reauth (e.g. DIGEST-MD5), if possible. -c Enable challenge prompt callbacks. This will cause the OTP mechanism to ask for the the one-time password instead of the secret pass-phrase (library generates the correct response). -i Don't send an initial client response for SASL mechanisms, even if the protocol supports it. -o option=value Set the SASL option to value. -v Verbose. Print out more information than usual. SEE ALSO
lmtpd(8) CMU
Project Cyrus LMTPTEST(1)
All times are GMT -4. The time now is 01:05 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy