当前位置:Linux教程 - Linux文化 - Linux用户管理问题

Linux用户管理问题


>>> 此贴的回复 >> 1/ [root@miaoquan tmp]# type useradd useradd is /usr/sbin/useradd [root@miaoquan tmp]# rpm -qf /usr/sbin/useradd shadow-utils-4.0.3-41.1

去www.rpmfind.net 下载 上面的shadow-utils包.就可以获得源代码.

2/ 既然是w命令的产生的.w命令的源代码中一定有.

3/ shell命令和内核实现通讯?? shell是C语言实现的.应该是通过系统调用 实现你所说的通讯.

4/ 用户的结构体? 不知道你是不是说的内核里的user_struct

struct user_struct { atomic_t __count; /* reference count */ atomic_t processes; /* How many processes does this user have? */ atomic_t files; /* How many open files does this user have? */ atomic_t sigpending; /* How many pending signals does this user have? */ #ifdef CONFIG_INOTIFY atomic_t inotify_watches; /* How many inotify watches does this user have? */ atomic_t inotify_devs; /* How many inotify devs does this user have opened? */ #endif /* protected by mq_lock */ unsigned long mq_bytes; /* How many bytes can be allocated to mqueue? */ unsigned long locked_shm; /* How many pages of mlocked shm ? */

#ifdef CONFIG_KEYS struct key *uid_keyring; /* UID specific keyring */ struct key *session_keyring; /* UID's default session keyring */ #endif

/* Hash table maintenance information */ struct list_head uidhash_list; uid_t uid; };

linux/sched.h