Lines Matching refs:pwd
1587 struct passwd *pwd;
1857 pwd = Get_Pwnam_alloc(tc, lp_guestaccount());
1859 if (!pwd) {
1866 if ((pwd = talloc(tc, struct passwd)) == NULL) {
1870 pwd->pw_name = talloc_strdup(pwd, lp_guestaccount());
1871 if (!winbind_allocate_uid(&(pwd->pw_uid))) {
1877 pwd->pw_gid = domusers_gid;
1878 pwd->pw_dir = talloc_strdup(tc, "/");
1879 pwd->pw_shell = talloc_strdup(tc, "/bin/false");
1880 if (!pwd->pw_dir || !pwd->pw_shell) {
1888 dn = talloc_asprintf(tc, "uid=%s,%s", pwd->pw_name, lp_ldap_user_suffix ());
1889 uidstr = talloc_asprintf(tc, "%u", (unsigned int)pwd->pw_uid);
1890 gidstr = talloc_asprintf(tc, "%u", (unsigned int)pwd->pw_gid);
1899 smbldap_set_mod(&mods, LDAP_MOD_ADD, "uid", pwd->pw_name);
1900 smbldap_set_mod(&mods, LDAP_MOD_ADD, "cn", pwd->pw_name);
1901 smbldap_set_mod(&mods, LDAP_MOD_ADD, "displayName", pwd->pw_name);
1904 if ((pwd->pw_dir != NULL) && (pwd->pw_dir[0] != '\0')) {
1905 smbldap_set_mod(&mods, LDAP_MOD_ADD, "homeDirectory", pwd->pw_dir);
1907 if ((pwd->pw_shell != NULL) && (pwd->pw_shell[0] != '\0')) {
1908 smbldap_set_mod(&mods, LDAP_MOD_ADD, "loginShell", pwd->pw_shell);
1930 pwd = Get_Pwnam_alloc(talloc_autofree_context(), lp_guestaccount());
1931 if (!pwd) {
1938 if (pwd->pw_gid == domusers_gid) {
1943 if (!pdb_getgrgid(&gmap, pwd->pw_gid)) {
1957 gidstr = talloc_asprintf(tc, "%u", (unsigned int)pwd->pw_gid);