11-27-2008
Tks, but that is giving me exactlly the same as my script, I am looking for all home dir that do not have a user in /etc/passwd
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello
How do i restrict a user only to his own directory so that he wont be able to cd to other directories.
say for excample there is user called xiamin then xiamin should be restricted to /usr/xiamin only.
i am on redhat linux
regards
Hrishy (4 Replies)
Discussion started by: xiamin
4 Replies
2. UNIX for Dummies Questions & Answers
Is there a very easy and configurable method to lock a user into their home directory?
I've checked on chroot() methodology.....but i'm not to excited about copying around ( or symlinking) libraries..binaries....etc.
Thought about altering the groups via chgrp...to only allow read access to... (1 Reply)
Discussion started by: thomas.jones
1 Replies
3. UNIX for Dummies Questions & Answers
I created a new user and assigned a certain home dir to tis user. I've noticed that this home dir (/export/home/test) is already assigned to other users. I really want to create a dedicated home dir for the new user. Can anyone tell me how I can modify this user with a new homedir?
Thx for... (4 Replies)
Discussion started by: kris_devis
4 Replies
4. Solaris
Hello,
i need to create a user who's access is restricted only to his home directory and below,
i restricted his pty access by adding 'no-pty' to the options of the ssh key in authorized_keys file. However, sftp access still allows this user access to all my file system
thanks (5 Replies)
Discussion started by: lidram
5 Replies
5. Shell Programming and Scripting
Hi all,
I would like to know how to find out the home directory of a particular user..
eg,
If am the root , then my Home directory will be /
if say am just a user logging into the terminal then my home dir would change,
so accordingly i would like to know how to find it out...
I know that... (7 Replies)
Discussion started by: wrapster
7 Replies
6. AIX
While doing a "little" clean up job, i noticed something weird...
A ls -altr of my / showed this:
drwxr-xr-x 1549 johcham grands 102400 Jan 28 13:13 home
How can a user become the owner / modify the group of my /home??? any thoughts? Can i chown this back to bin:bin (i think that... (2 Replies)
Discussion started by: Stephan
2 Replies
7. Red Hat
Hi,
By default user's home directory will be /home/$user.
I want to change it to /javauser/$user. How can I do it?
Thanks
Jeevan. (5 Replies)
Discussion started by: jredx
5 Replies
8. 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
9. Solaris
Hello all,
I am Installing Oracle 11g on my Solaris OS.
I created the below oracle user:
# /usr/sbin/useradd -g oinstall -G dba oracle
but when i am trying to to su - oracle it give me the below error
No directory
Do i have to setup a home directory for oracle user? and how can i do... (1 Reply)
Discussion started by: beayni33
1 Replies
10. UNIX for Dummies Questions & Answers
Whenever i switch from root to another user, by doing su - user, it takes me to home directory of user. This is very annoying as i want to be in same dir to run different commands as root sometimes and sometimes as normal user.
How to fix this? (1 Reply)
Discussion started by: syncmaster
1 Replies
LEARN ABOUT CENTOS
hesiod_getpwuid
HESIOD(3) Library Functions Manual HESIOD(3)
NAME
hesiod_getpwnam, hesiod_getpwuid, hesiod_free_passwd - Hesiod functions for retrieving passwd information
SYNOPSIS
#include <hesiod.h>
struct passwd *hesiod_getpwnam(void *context, const char *name)
struct passwd *hesiod_getpwuid(void *context, uid_t uid)
void hesiod_free_passwd(void *context, struct passwd *pw)
cc file.c -lhesiod
DESCRIPTION
This family of functions allows you to retrieve passwd database information using Hesiod. To perform lookups, you need an initialized Hes-
iod context; see hesiod(3) for details. You may look up passwd information by name or by uid; information is returned in the same format
as by getpwnam or getpwuid. It is the caller's responsibility to call hesiod_free_passwd with the returned passwd entry to free the
resources used by the passwd entry.
Hesiod queries for passwd information are made using the ``passwd'' or ``uid'' Hesiod type, using either the username or the decimal repre-
sentation of the uid as the Hesiod name. The corresponding records should be a colon-separated list of fields giving the username,
encrypted password, uid, gid, GECOS information, home directory, and shell of the user.
RETURN VALUES
On failure, hesiod_getpwnam and hesiod_getpwuid return NULL and set the global variable errno to indicate the error.
ERRORS
These calls may fail for any of the reasons the routine hesiod_resolve may fail.
SEE ALSO
hesiod(3)
30 November 1996 HESIOD(3)