12-22-2009
Reg:Login details
Hi,
I want to change my login name.Can u please suggest me how to do that.
Regards,
Jyothi
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi there,
I am wondering if by logging in to a unix system, if it is possible to get the IP address of the machine I am connecting FROM.
I know how I can do this using the name server, but is this possible without a host lookup?:confused:
Thanks,
-ghoti (15 Replies)
Discussion started by: ghoti
15 Replies
2. Web Development
Hello,
I have created a web page on a server using apache and added .htaccess and .htpasswd in the folder for authentification.
I was wondering if there was anyway to tie-in the login for this page with the login used to logon to the server.
i.e. the same login info. is used for both,... (2 Replies)
Discussion started by: WhotheWhat
2 Replies
3. UNIX for Dummies Questions & Answers
As a root user i switch to a different user say "oratest". I would like to know the details like at what time did the switch ( su - oratest ) happen.
Are there any logs to check this
Thanks. (4 Replies)
Discussion started by: jjoy
4 Replies
4. AIX
Friends!!
I need your help. Where can i change/set the last login details as below in aix 5.3. And how to do that to get the results as exactly below
login as: mbpops
mbpops@xx.28.3.24's password:
Last unsuccessful login: Mon Nov 22 14:32:27 GMT 2010 on ssh from 10.132.5.129
Last login:... (17 Replies)
Discussion started by: kmvinay
17 Replies
5. AIX
Hi Friends
I have a query. we had a requirement to see the last login details of our users so I ran the command last <username> and the output i get is:
wtmp begins Apr 17 21:48
Now I need to know couple of things:
1. How can I see the year this log is being read from wtmp file
2. Is... (4 Replies)
Discussion started by: nathandrake13
4 Replies
6. UNIX for Dummies Questions & Answers
I have scheduled couple of shell scripts to run using 'at' command.
The o/p of at -l is:
$ at -l
1320904800.a Thu Nov 10 01:00:00 2011
1320894000.a Wed Nov 9 22:00:00 2011
1320876000.a Wed Nov 9 17:00:00 2011
$ uname -a
SunOS dc2prcrptetl2 5.9 Generic_122300-54 sun4u sparc... (2 Replies)
Discussion started by: superparticle
2 Replies
7. UNIX for Dummies Questions & Answers
Hi I'm new to Shell scripting .Can anyone please help me how to capture user's login and logout details and load them into a table...
we are using Oracle DB on UNIX:confused: (3 Replies)
Discussion started by: rajmohan146
3 Replies
8. Shell Programming and Scripting
Hi,
How i can pass the login details to the URL which is password protected with the htaccess using command line or script (perl,or shell,or php).
Any help or hint appreciated.
Thanks,
SJ (4 Replies)
Discussion started by: SilvesterJ
4 Replies
9. Post Here to Contact Site Administrators and Moderators
Dear Administrators!
I would like to change my username for this forum, would it be possible?
Regards
FR (1 Reply)
Discussion started by: fretagi
1 Replies
10. UNIX for Advanced & Expert Users
Most of my Solaris 10 user accounts are generally 10 characters long. When I run the 'last' command the report only shows the first 8 characters so the information is not very helpful. How can I report the full 10 character user account. (1 Reply)
Discussion started by: PPOWER55
1 Replies
LEARN ABOUT OPENDARWIN
setlogin
GETLOGIN(2) BSD System Calls Manual GETLOGIN(2)
NAME
getlogin, setlogin -- get/set login name
SYNOPSIS
#include <unistd.h>
char *
getlogin(void);
int
setlogin(const char *name);
DESCRIPTION
The getlogin() routine returns the login name of the user associated with the current session, as previously set by setlogin(). The name is
normally associated with a login shell at the time a session is created, and is inherited by all processes descended from the login shell.
(This is true even if some of those processes assume another user ID, for example when su(1) is used.)
Setlogin() sets the login name of the user associated with the current session to name. This call is restricted to the super-user, and is
normally used only when a new session is being created on behalf of the named user (for example, at login time, or when a remote shell is
invoked).
RETURN VALUES
If a call to getlogin() succeeds, it returns a pointer to a null-terminated string in a static buffer. If the name has not been set, it
returns NULL. If a call to setlogin() succeeds, a value of 0 is returned. If setlogin() fails, a value of -1 is returned and an error code
is placed in the global location errno.
ERRORS
The following errors may be returned by these calls:
[EFAULT] The name parameter gave an invalid address.
[EINVAL] The name parameter pointed to a string that was too long. Login names are limited to MAXLOGNAME (from <sys/param.h>)
characters, currently 12.
[EPERM] The caller tried to set the login name and was not the super-user.
SEE ALSO
setsid(2)
BUGS
Login names are limited in length by setlogin(). However, lower limits are placed on login names elsewhere in the system (UT_NAMESIZE in
<utmp.h>).
In earlier versions of the system, getlogin() failed unless the process was associated with a login terminal. The current implementation
(using setlogin()) allows getlogin to succeed even when the process has no controlling terminal. In earlier versions of the system, the
value returned by getlogin() could not be trusted without checking the user ID. Portable programs should probably still make this check.
HISTORY
The getlogin() function first appeared in 4.4BSD.
4.2 Berkeley Distribution June 9, 1993 4.2 Berkeley Distribution