Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Why does "ps -[u|U] username" not list processes when username is numeric? Post 303039928 by Corona688 on Thursday 17th of October 2019 04:25:32 PM
Old 10-17-2019
What's your operating system? That's important for how ps behaves.

It can't match ID and name on numbers because that's ambiguous. There could be several "correct" entries, which isn't supposed to be possible.

If you're assigning these numbers arbitrarily, I'd suggest getting them from UNIX instead of giving them to UNIX.

If you have to deal with this as is, you may need to look up the UIDs in situ.
Code:
UID=$(awk -F: '$1 == NAME { print $3 ; exit }' NAME="12345" /etc/passwd)


Last edited by Corona688; 10-17-2019 at 05:34 PM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

check input = "empty" and "numeric"

Hi how to check input is "empty" and "numeric" in ksh? e.g: ./myscript.ksh k output show: invalid number input ./myscript.ksh output show: no input ./myscript.ksh 10 output show: input is numeric (6 Replies)
Discussion started by: geoffry
6 Replies

2. UNIX for Dummies Questions & Answers

Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`"

Hi Friends, Can any of you explain me about the below line of code? mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'` Im not able to understand, what exactly it is doing :confused: Any help would be useful for me. Lokesha (4 Replies)
Discussion started by: Lokesha
4 Replies

3. Solaris

Using all numeric for username

Hello, We have a Solaris 9 machine and recently our client want to create username based on staff numbers (all numeric). Is there any limitation in Solaris regarding creating username with numeric values (eg: 13598029)? Thanks & Regards Aryawarman Mahzar (5 Replies)
Discussion started by: aryamahzar
5 Replies

4. 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

5. Shell Programming and Scripting

Read from "list1" and list matches in "list2"

I want to print any matching IP addresse in List1 with List 2; List 1 List of IP addresses; 161.85.58.210 250.57.15.129 217.23.162.249 74.76.129.101 30.221.177.237 3.147.200.59 170.58.142.64 127.65.109.33 150.167.242.146 223.3.20.186 25.181.180.99 2.55.199.32 (3 Replies)
Discussion started by: lewk
3 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. SuSE

SUSE "passwd username" ask for password 4 times

Below is the error I'm getting. # passwd username Changing password for username. New Password: Reenter New Password: Password changed. New UNIX password: Retype new UNIX password: Password has been already used. Choose another. passwd: Authentication token manipulation error# cat... (0 Replies)
Discussion started by: toor13
0 Replies

8. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies

9. Linux

Problem with SFTP Command line, "@" in username.

Hi Guys Any help is appreciated very much! I'm trying to use SFTP to an external server using the native SFTP Client in RHEL 6 and 7. I've been given a username on the remote SFTP Server of myemail@myorg.com. I can not seem to escape that @ sign no matter what I do. I've tried these... (16 Replies)
Discussion started by: BG_JrAdmin
16 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
FS_EXPORTAFS(1) 					       AFS Command Reference						   FS_EXPORTAFS(1)

NAME
fs_exportafs - Configures export of AFS to clients of other file systems SYNOPSIS
fs exportafs -type <exporter name> [-start <start/stop translator (on | off)>] [-convert <convert from afs to unix mode (on | off)>] [-uidcheck <run on strict 'uid check' mode (on | off)>] [-submounts <allow nfs mounts to subdirs of /afs/.. (on | off)>] [-help] fs exp -t <exporter name> [-st <start/stop translator (on | off)>] [-c <convert from afs to unix mode (on | off)>] [-u <run on strict 'uid check' mode (on | off)>] [-su <allow nfs mounts to subdirs of /afs/.. (on | off)>] [-h] DESCRIPTION
The fs exportafs command sets (if the -start argument is provided) or reports (if it is omitted) whether the machine can reexport the AFS filespace to clients of a non-AFS file system. To control certain features of the translation protocol, use the following arguments: o To control whether the UNIX group and other mode bits on an AFS file or directory are set to match the owner mode bits when it is exported to the non-AFS file system, use the -convert argument. o To control whether tokens can be placed in a credential structure identified by a UID that differs from the local UID of the entity that is placing the tokens in the structure, use the -uidcheck argument. The most common use is to control whether issuers of the knfs command can specify a value for its -id argument that does not match their local UID on the NFS/AFS translator machine. o To control whether users can create mounts in the non-AFS filespace to an AFS directory other than /afs, use the -submounts argument. OPTIONS
-type <exporter name> Names the alternate file system to which to reexport the AFS filespace. The only acceptable value is "nfs", in lowercase letters only. -start on =item -start off Enables the local machine to reexport the AFS filespace if the value is "on", or disables it if the value is "off". Omit this argument to report the current setting for all of the configurable parameters. -convert on =item -convert off Controls the setting of the UNIX group and other mode bits on AFS files and directories exported to the non-AFS file system. If the value is "on", they are set to match the owner mode bits. If the value is "off", the bits are not changed. If this argument is omitted, the default value is "on". -uidcheck on =item -uidcheck off Controls whether tokens can be placed in a credential structure identified by a UID that differs from the local UID of the entity that is placing the tokens in the structure. o If the value is on, the UID that identifies the credential structure must match the local UID. With respect to the knfs command, this value means that the value of -id argument must match the issuer's local UID on the translator machine. In practice, this setting makes it pointless to include the -id argument to the knfs command, because the only acceptable value (the issuer's local UID) is already used when the -id argument is omitted. Enabling UID checking also makes it impossible to issue the klog and pagsh commands on a client machine of the non-AFS file system even though it is a system type supported by AFS. For an explanation, see klog(1). o If the value is off (the default), tokens can be assigned to a local UID in the non-AFS file system that does not match the local UID of the entity assigning the tokens. With respect to the knfs command, it means that the issuer can use the -id argument to assign tokens to a local UID on the NFS client machine that does not match his or her local UID on the translator machine. (An example is assigning tokens to the MFS client machine's local superuser "root".) This setting allows more than one issuer of the knfs command to make tokens available to the same user on the NFS client machine. Each time a different user issues the knfs command with the same value for the -id argument, that user's tokens overwrite the existing ones. This can result in unpredictable access for the user on the NFS client machine. -submounts on =item -submounts off Controls whether a user of the non-AFS filesystem can mount any directory in the AFS filespace other than the top-level /afs directory. If the value is "on", such submounts are allowed. If the value is "off", only mounts of the /afs directory are allowed. If this argument is omitted, the default value is "off". -help Prints the online help for this command. All other valid options are ignored. OUTPUT
If the machine is not even configured as a server of the non-AFS file system, the following message appears: Sorry, the <file_system>-exporter type is currently not supported on this AFS client If the machine is configured as a server of the non-AFS file system but is not currently enabled to reexport AFS to it (because the -start argument to this command is not set to "on"), the message is as follows: '<file_system>' translator is disabled If the machine is enabled to reexport AFS, the following message precedes messages that report the settings of the other parameters. '<file_system>' translator is enabled with the following options: The following messages indicate that the -convert argument is set to "on" or "off" respectively: Running in convert owner mode bits to world/other mode Running in strict unix mode The following messages indicate that the -uidcheck argument is set to "on" or "off" respectively: Running in strict 'passwd sync' mode Running in no 'passwd sync' mode The following messages indicate that the -submounts argument is set to "on" or "off" respectively: Allow mounts of /afs/.. subdirs Only mounts to /afs allowed EXAMPLES
The following example shows that the local machine can export AFS to NFS client machines. % fs exportafs nfs 'nfs' translator is enabled with the following options: Running in convert owner mode bits to world/other mode Running in no 'passwd sync' mode Only mounts to /afs allowed The following example enables the machine as an NFS server and converts the UNIX group and other mode bits on exported AFS directories and files to match the UNIX owner mode bits. % fs exportafs -type nfs -start on -convert on The following example disables the machine from reexporting AFS to NFS client machines: % fs exportafs -type nfs -start off PRIVILEGE REQUIRED
The issuer must be logged in as the local superuser root. SEE ALSO
klog(1), knfs(1) COPYRIGHT
IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved. This documentation is covered by the IBM Public License Version 1.0. It was converted from HTML to POD by software written by Chas Williams and Russ Allbery, based on work by Alf Wachsmann and Elizabeth Cassell. OpenAFS 2012-03-26 FS_EXPORTAFS(1)
All times are GMT -4. The time now is 01:34 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy