Where is my unix id stored in the system?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Where is my unix id stored in the system?
# 1  
Old 07-30-2006
Where is my unix id stored in the system?

Hi,

I logged in to a Sun unix box. I would like to know where my unix id is stored. So I did a "more /etc/passwd | grep <my unix id> but it did not show up. Where can I find my unix id and what is the command to see it?

Thanks in advanced,
XZOR
# 2  
Old 07-30-2006
Code:
grep "login" /etc/passwd | cut -d: -f3

For example:
Code:
$ grep "admin" /etc/passwd | cut -d: -f3
101

Regards,
Tayyab
# 3  
Old 07-30-2006
If it's a Unix box, it will be in the /etc/passwd file.

Try searching for it like this:

Code:
$ grep '^tstusr01' /etc/passwd
tstusr01:x:506:506::/home/tstusr01:/bin/ksh

Replace 'tstusr01' with your Unix userid.
# 4  
Old 07-30-2006
It won't show up in /etc/passwd if your box is in a nis or ldap domain
# 5  
Old 07-31-2006
Hi System Shock,
You gave me a clue when you mentioned the NIS. Somebody told me to findout whether you are using NIS or not this is the command:
ypcat passwd | grep <user id>
Thanks for the clue and thanks for those who responded I appreciate it.
XZOR
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Sybase Stored Proc call from UNIX script.

Hi, I am new to shell scripting and Sybase database i need a help that i try to execute a SYBASE stored procedure from a Unix shell script and wanna write the output of the SP into a Text File.somehow i try to find a solution but whwn i try to run the script i am not getting the output file with... (1 Reply)
Discussion started by: Arun619
1 Replies

2. Post Here to Contact Site Administrators and Moderators

Calling Sybase Stored proc from UNIX Shellscript.

Hi, I am new to shell scripting and Sybase database i need a help that i try to execute a SYBASE stored procedure from a Unix shell script and wanna write the output of the SP into a Text File, somehow i tried to find a solution but when i try to run the script i am not getting the output file with... (1 Reply)
Discussion started by: Arun619
1 Replies

3. Shell Programming and Scripting

How to KIll a Stored procedure invoked by UNIX?

Hi, I am using sql server 2008 version and invoking the stored procedure using unix script. I want to know the procedure of killing the stored procedure in sql server. If I kill -9 the unix script will it also terminate the process at the SQL server. When I executed the kill -9 PID in unix... (2 Replies)
Discussion started by: Rahul Raj
2 Replies

4. Shell Programming and Scripting

Unix path stored as a column in table

The db2 table stores the unix path as below PARM VALUE RootPath $SRootDir Target $SRootDir/target $SRootDir is set in the env variable as /home/test/root In the shell script i read the table value and store it in a variable pth=db2 -x "select VALUE from... (2 Replies)
Discussion started by: 2jnags
2 Replies

5. Shell Programming and Scripting

Passing a value to stored procedure from unix shell script

Hi Dudes :) I want a unix shell script to pass value to SQL stored procedure. Below is the procedure declare res varchar2(10); begin odm_load_check('PRE_SANITY',res); dbms_output.put_line(res); end; select * from error_log; truncate table error_log; select * from test; (1 Reply)
Discussion started by: shirdi
1 Replies

6. UNIX for Dummies Questions & Answers

Calling stored procedure from unix

Hi, My stored procedure returns a value. How to retrieve the value and display in unix. Stored procedure CREATE OR REPLACE PROCEDURE gohan(num INT) IS BEGIN DBMS_OUTPUT.PUT_LINE('My lucky number is ' || num); END; Unix Scripting i used sqlplus -s... (7 Replies)
Discussion started by: gohan3376
7 Replies

7. Shell Programming and Scripting

Need to call stored procedure from unix script

Hi Guys, I have a stored procedure which has 5 out parameters. I need to call the stored procedure from the script. When i use the following in my script, db2 "CALL FCFM.PART_MASTER_TMP($Return_code,$Message,$Message1,$SQL,$Load_count)" >> $LOG_FILE I am getting an error.. Please... (1 Reply)
Discussion started by: mac4rfree
1 Replies

8. UNIX for Advanced & Expert Users

Executing Stored Proc from unix prompt.

Hi All, I want to run/execute a stored procedure (sybase) from unix command prompt not by login in isql utility which is provided my Sybase guys. Is there way ..? Thanks in advance for your help !!! Regards, Arvind S. (0 Replies)
Discussion started by: arvindcgi
0 Replies

9. Solaris

Executing MS-SQL stored procedures from Unix/C Program?

All, We are contemplating a port of an existing software product and would like to expend as little effort as possible. Our new database would be MS-SQL, and we would write stored procedures to perform common db operations. We'd like to call these stored procedures from C or C++ code running... (3 Replies)
Discussion started by: mparks
3 Replies

10. UNIX for Advanced & Expert Users

Unix Stored Procdure

I have 2 stored procedures to be executed. if the sysdate is between 12 am and 6 am i want to run procedure 1 else procedure 2 How do i do it with variables for time in the script. The DB is oracle Thanks (7 Replies)
Discussion started by: kris01752
7 Replies
Login or Register to Ask a Question