|
Home > Archive > Unix Shell > September 2006 > Changing UnixID
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| balreddy.gattu@gmail.com 2006-09-27, 1:21 pm |
| Hello All,
I want to know is there any command exists to change the unixuserid.
Example:
My user id is /home/test
I want to change the id test to dev i.e my home directory will become
/home/dev.
I know we can create new id and copy the files from test to dev and
delete the test id.
Instead of that if we have any shortcut/ command to just change the
loginid in solaris.
Thanks,
Gattu
| |
| Michael Heiming 2006-09-27, 1:21 pm |
| In comp.unix.shell balreddy.gattu@gmail.com:
> Hello All,
> I want to know is there any command exists to change the unixuserid.
> Example:
> My user id is /home/test
> I want to change the id test to dev i.e my home directory will become
> /home/dev.
> I know we can create new id and copy the files from test to dev and
> delete the test id.
> Instead of that if we have any shortcut/ command to just change the
> loginid in solaris.
man usermod
NAME
usermod - modify a user's login information on the system
Good luck
BTW
This isn't really a shell question, cua (comp.unix.admin) would
have been a better choice.
--
Michael Heiming (X-PGP-Sig > GPG-Key ID: EDD27B94)
mail: echo zvpunry@urvzvat.qr | PERL -pe 'y/a-z/n-za-m/'
#bofh excuse 52: Smell from unhygienic janitorial staff wrecked
the tape heads
| |
| Steven Mocking 2006-09-27, 7:37 pm |
| balreddy.gattu@gmail.com wrote:
> Hello All,
> I want to know is there any command exists to change the unixuserid.
>
> Example:
>
> My user id is /home/test
> I want to change the id test to dev i.e my home directory will become
> /home/dev.
> I know we can create new id and copy the files from test to dev and
> delete the test id.
> Instead of that if we have any shortcut/ command to just change the
> loginid in solaris.
You're talking about a user*name*. Make sure you are logged out. Login
as root and :
# usermod -l dev test
# mv /home/test /home/dev
That should do it, but there might be braindead applications which
depend on your username and require hand-hacking. You'll notice their
whining soon enough.
| |
| Lew Pitcher 2006-09-28, 7:32 am |
| -----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Steven Mocking wrote:
> balreddy.gattu@gmail.com wrote:
>
> You're talking about a user*name*. Make sure you are logged out. Login
> as root and :
>
> # usermod -l dev test
> # mv /home/test /home/dev
Even easier is to add the -m and -d options and let usermod do the move
itself
usermod -d /home/dev -m -l dev test
See usermod(8) for details ("man 8 usermod")
> That should do it, but there might be braindead applications which
> depend on your username and require hand-hacking. You'll notice their
> whining soon enough.
Agreed
- --
Lew Pitcher
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (MingW32) - WinPT 0.11.12
iD8DBQFFG7yRagVFX4UWr64RAjbFAKCPrbB5bh+S
qHkq/bpQ4UGbCnOAkACg24PG
CrAzRmUmM7/7RlOXmoOLJ4I=
=j/TN
-----END PGP SIGNATURE-----
|
|
|
|
|