Sponsored Content
Top Forums Shell Programming and Scripting change home directory by modifying passwd Post 302239102 by tjay83 on Tuesday 23rd of September 2008 12:06:04 AM
Old 09-23-2008
yea
I tried with those variables:
username=temp
new_path=/home/temp

but not correctly working
 

8 More Discussions You Might Find Interesting

1. Solaris

/etc/passwd $HOME

I would like to add a user with the following $HOME: /var/abc/AB!CD!DE/error yes - this directory actually exists on the system. I would like the user to log into the above directory. I have tried wrapping in single quotes (`) as well as using the escape (\) but I guess that I do not have... (9 Replies)
Discussion started by: andrewrgrayjr
9 Replies

2. Shell Programming and Scripting

force to change password(by modifying /etc/shadow)

hi by modifying /etc/shadow how can I Force a change of password so that user has at least 1 week to login? I did it by using: echo "enter username to force password change" read user; chage -M 7 $user; How can I do it by modifying /etc/shadow?? (6 Replies)
Discussion started by: tjay83
6 Replies

3. Solaris

how to change /export/home/user dir to /home /user in solaris

Hi all i am using solaris 10, i am creating user with useradd -d/home/user -m -s /bin/sh user user is created with in the following path /export/home/user (auto mount) i need the user to be created like this (/home as default home directory ) useradd -d /home/user -m -s /bin/sh... (2 Replies)
Discussion started by: kalyankalyan
2 Replies

4. Solaris

How to recycle old passwords by modifying /etc/passwd file ?

hi, has anyone here tried to recycle old passwords by copying something out of the passwd file and paste them back into the same passwd file ? can it work this way ? some of our applications passwords are expiring but they cannot be change due to application concerns, so therefore we must... (7 Replies)
Discussion started by: Exposure
7 Replies

5. Shell Programming and Scripting

Modifying sed to only change last occurrence.

I'm using sed to switch integers (one or more digits) to the other side of the ':' colon. For example: "47593:23421" would then be "23421:47593". The way it functions right now, it is messing my settings file to use with gnuplot. The current command is: sed 's/\(*\):\(*\)/\2:\1/' out3 >... (3 Replies)
Discussion started by: D2K
3 Replies

6. UNIX for Dummies Questions & Answers

Extract user accounts and home directory from /etc/passwd.

I am trying to obtain all user accounts and their respective home directories. /etc/passwd contains the required information, but I want to filter it to only show the uid,username and home directory path. I am working on a Solaris 11 machine. I made a little headway so far, but I got stuck... (7 Replies)
Discussion started by: Hijanoqu
7 Replies

7. UNIX for Advanced & Expert Users

Change sFTP home directory for particular user and from specific server

Hello Folks, Of course i came here for your favour :) How to set a defalult home directory for sFTP login ( at present users land in to their home directrory) when they connect from specific server. When server(A) sFTP's to Linux server(B) they land to thier home directory. I want... (5 Replies)
Discussion started by: Thala
5 Replies

8. Solaris

SunOS confusing root directory and user home directory

Hello, I've just started using a Solaris machine with SunOS 5.10. After the machine is turned on, I open a Console window and at the prompt, if I execute a pwd command, it tells me I'm at my home directory (someone configured "myuser" as default user after init). ... (2 Replies)
Discussion started by: egyassun
2 Replies
EIO_RENAME(3)								 1							     EIO_RENAME(3)

eio_rename - Change the name or location of a file.

SYNOPSIS
resource eio_rename (string $path, string $new_path, [int $pri = EIO_PRI_DEFAULT], [callable $callback = NULL], [mixed $data = NULL]) DESCRIPTION
eio_rename(3) renames or moves a file to new location. PARAMETERS
o $path - Source path o $new_path - Target path o $pri -The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. If NULL passed, $pri internally is set to EIO_PRI_DEFAULT. o $callback -$callback function is called when the request is done. It should match the following prototype: void callback(mixed $data, int $result[, resource $req]); o $data -is custom data passed to the request. o $result -request-specific result value; basically, the value returned by corresponding system call. o $req -is optional request resource which can be used with functions like eio_get_last_error(3) o $data - Arbitrary variable passed to $callback. RETURN VALUES
eio_rename(3) returns request resource on success or FALSE on error. EXAMPLES
Example #1 eio_rename(3) example <?php $filename = dirname(__FILE__)."/eio-temp-file.dat"; touch($filename); $new_filename = dirname(__FILE__)."/eio-temp-file-new.dat"; function my_rename_cb($data, $result) { global $filename, $new_filename; if ($result == 0 && !file_exists($filename) && file_exists($new_filename)) { @unlink($new_filename); echo "eio_rename_ok"; } else { @unlink($filename); } } eio_rename($filename, $new_filename, EIO_PRI_DEFAULT, "my_rename_cb", $filename); eio_event_loop(); ?> The above example will output something similar to: eio_rename_ok PHP Documentation Group EIO_RENAME(3)
All times are GMT -4. The time now is 01:06 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy