search for: pw_shell

Displaying 20 results from an estimated 39 matches for "pw_shell".

2009 Mar 13
2
New to list, got a quota question
...swd AS password FROM vpopmail WHERE pw_name = '%n' AND pw_domain = '%d' user_query = SELECT pw_dir as home, 508 AS uid, 503 AS gid FROM vpopmail WHERE pw_name = '%n' AND pw_domain = '%d' My vpopmail installation keeps the quota information in the mysql database (pw_shell field) instead of maildirsize. The quota is in maildir format, e.g. 400M or 50331648S. Unlimited quota is specified as NOQUOTA. The question is... Is it possible to make dovecot understand this format and get it directly from SQL (via user_query, for example) or would it be easier to reconfigur...
2007 Jun 12
1
vpopmail quota
...stead of having to rely on the validity of the maildirsize files. It doesn't look like this is currently possible. Would simply adding a auth_stream_reply_add call for "quota" with a suitable value in vpopmail_lookup be sufficient to make this work? (the quota can be read from the pw_shell field of the vqpasswd struct) Onno -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part. URL: <http://dovecot.org/pipermail/dovecot/attachments/20070612/b75...
2015 Jan 21
4
way to set shell used for remote commands?
...ince OpenSSH provides no way to run commands with anything other than the user's password shell, it really needs to do so. A simple patch would be to session.c, @ line 1746 : /* * Get the shell from the password data. An empty shell field is * legal, and means /bin/sh. */ shell = (pw->pw_shell[0] == 0) ? _PATH_BSHELL : pw->pw_shell; One could do something like: char *sh; if ( (sh=getenv("SSH_SHELL") )!= NULL ) shell = sh; else shell = (pw->pw_shell[0] == 0) ? _PATH_BSHELL : pw->pw_shell; Or provide some configuration option - this wo...
2009 Dec 14
2
vpopmail/mysql/quota
...ECT pw_clear_passwd AS password, CONCAT(pw_name, '@', pw_domain) AS user FROM vpopmail WHERE pw_name = '%n' AND pw_domain = '%d' user_query = SELECT CONCAT(pw_name, '@', pw_domain) AS user, pw_dir as home, 508 AS uid, 503 AS gid, concat('maildir:backend=%q', pw_shell) AS quota_rule FROM vpopmail WHERE pw_name = '%n' AND pw_domain = '%d' args: quota_template=quota_rule=*:backend=%q plugin: quota: maildir ---------------------------------------------------------------------------------------- dovecotsql.conf
2000 Apr 15
0
patch in user validation code
...13 00:35:54 2000 @@ -1121,6 +1121,7 @@ struct stat st; struct group *grp; int i; + char *shell; #ifdef WITH_AIXAUTHENTICATE char *loginmsg; #endif /* WITH_AIXAUTHENTICATE */ @@ -1130,7 +1131,12 @@ return 0; /* deny if shell does not exists or is not executable */ - if (stat(pw->pw_shell, &st) != 0) + /* first make sure that "" == "/bin/sh", as specified in passwd(5) */ + if (!pw->pw_shell || !strlen(pw->pw_shell)) + shell = _PATH_BSHELL; + else + shell = pw->pw_shell; + if (stat(shell, &st) != 0) return 0; if (!((st.st_mode & S_IFREG...
2000 Oct 07
0
OpenSSH changes for BSD/OS
...= strchr(user, ':')) != NULL) + *p = '\0'; + } + #endif pw = getpwnam(user); if (!pw || !allowed_user(pw)) do_fake_authloop1(user); *************** *** 482,487 **** --- 500,508 ---- pwcopy.pw_gid = pw->pw_gid; pwcopy.pw_dir = xstrdup(pw->pw_dir); pwcopy.pw_shell = xstrdup(pw->pw_shell); + #if defined(BSD) && BSD >= 199506 + pwcopy.pw_class = xstrdup(pw->pw_class); + #endif pw = &pwcopy; #ifdef USE_PAM *************** *** 508,514 **** (sia_validate_user(NULL, saved_argc, saved_argv, get_canonical_hostname(), pw-&...
2020 Mar 18
2
Headsup on feature removal
...mail password=Vp0pM4iL default_pass_scheme = MD5-CRYPT ### Query to get a list of all usernames. iterate_query = SELECT CONCAT(pw_name, '@', pw_domain) AS user FROM vpopmail ### user_query for vpopmail user_query = SELECT pw_dir AS home, 89 AS uid, 89 AS gid, concat('*:backend=', pw_shell) AS quota_rule FROM vpopmail WHERE pw_name = '%n' AND pw_domain = '%d' ### password_query for vpopmail (not used) #password_query = SELECT CONCAT(pw_name, '@', pw_domain) AS user, pw_passwd AS password FROM vpopmail WHERE pw_name = '%n' AND pw_domain = '%d...
2000 Mar 31
0
[PATCH] empty shell in /etc/passwd
...:21 2000 @@ -1121,6 +1121,7 @@ struct stat st; struct group *grp; int i; + char*shell; #ifdef WITH_AIXAUTHENTICATE char *loginmsg; #endif /* WITH_AIXAUTHENTICATE */ @@ -1129,8 +1130,9 @@ if (!pw) return 0; - /* deny if shell does not exists or is not executable */ - if (stat(pw->pw_shell, &st) != 0) + /* deny if shell is not executable, empty shell defaults to /bin/sh */ + shell = pw->pw_shell[0] ? _PATH_BSHELL : pw->pw_shell; + if (stat(shell, &st) != 0) return 0; if (!((st.st_mode & S_IFREG) && (st.st_mode & (S_IXOTH|S_IXUSR|S_IXGRP)))) retur...
2000 Mar 31
1
[PATCH] Correction empty shell-field patch
...:21 2000 @@ -1121,6 +1121,7 @@ struct stat st; struct group *grp; int i; + char*shell; #ifdef WITH_AIXAUTHENTICATE char *loginmsg; #endif /* WITH_AIXAUTHENTICATE */ @@ -1129,8 +1130,9 @@ if (!pw) return 0; - /* deny if shell does not exists or is not executable */ - if (stat(pw->pw_shell, &st) != 0) + /* deny if shell is not executable, empty shell defaults to /bin/sh */ + shell = pw->pw_shell[0] ? pw->pw_shell : _PATH_BSHELL; + if (stat(shell, &st) != 0) return 0; if (!((st.st_mode & S_IFREG) && (st.st_mode & (S_IXOTH|S_IXUSR|S_IXGRP)))) retu...
2020 Mar 19
2
Headsup on feature removal
Il 19/03/20 02:01, John Stoffel ha scritto: > Alessio> ### user_query for vpopmail > Alessio> user_query = SELECT pw_dir AS home, 89 AS uid, 89 AS gid, > Alessio> concat('*:backend=', pw_shell) AS quota_rule FROM vpopmail > Alessio> WHERE pw_name = '%n' AND pw_domain = '%d' > > Careful! You need to explain that 89 is the UID and GID of the > vpopmail user account? Or some other account? I don't use either of > these auth methods, but this just str...
2001 Jun 18
2
Patch for changing expired passwords
...t #3 is a single patch file for all the changes against OpenSSH_2.9p2 in case anybody else on the list wants to try it. - Dave Dykstra -------------- next part -------------- *** auth.c.O Mon Jun 18 09:31:58 2001 --- auth.c Mon Jun 18 09:35:08 2001 *************** *** 68,83 **** shell = (pw->pw_shell[0] == '\0') ? _PATH_BSHELL : pw->pw_shell; /* deny if shell does not exists or is not executable */ ! if (stat(shell, &st) != 0) return 0; ! if (!((st.st_mode & S_IFREG) && (st.st_mode & (S_IXOTH|S_IXUSR|S_IXGRP)))) return 0; /* Return false if u...
2000 Feb 27
0
[PATCH] Fix login.conf, expiration, BSD compatibility in OpenSSH
...@@ } if (getuid() != pw->pw_uid || geteuid() != pw->pw_uid) fatal("Failed to set uids to %d.", (int) pw->pw_uid); +#endif /* LOGIN_CAP */ } /* * Get the shell from the password data. An empty shell field is * legal, and means /bin/sh. */ + shell = (pw->pw_shell[0] == '\0') ? _PATH_BSHELL : pw->pw_shell; #ifdef LOGIN_CAP - shell = pw->pw_shell; shell = login_getcapstr(lc, "shell", shell, shell); - if (shell[0] == '\0') - shell = _PATH_BSHELL; -#else /* LOGIN_CAP */ - shell = (pw->pw_shell[0] == '\0') ? _PATH_B...
2013 Jan 31
3
Userdb passwd and 'nologin' users
I am running Dovecot with system users (userdb passwd), but some of those users don't have shell accounts on the IMAP server so their shell on that machine is set to /usr/sbin/nologin. Currently I am using maildirs and this is not a problem, but I am in the process of switching to dbox which means I will need a cronjob running 'doveadm purge -A'. During testing I found that those
2001 Feb 28
2
[PATCH]: auth.c (pwcopy): Copy pw_gecos field when build for Cygwin
....23 +++ auth.c 2001/02/28 15:47:23 @@ -182,6 +182,9 @@ pwcopy(struct passwd *pw) #ifdef HAVE_PW_CLASS_IN_PASSWD copy->pw_class = xstrdup(pw->pw_class); #endif +#ifdef HAVE_CYGWIN + copy->pw_gecos = xstrdup(pw->pw_gecos); +#endif copy->pw_dir = xstrdup(pw->pw_dir); copy->pw_shell = xstrdup(pw->pw_shell); return copy; Thanks in advance, Corinna -- Corinna Vinschen Cygwin Developer Red Hat, Inc. mailto:vinschen at redhat.com
2002 Dec 07
0
[Bug 453] New: [PATCH] The SHELL env variable is set incorrectly, when shell is overridden from login.conf.
...be overridden in the login class. The sshd currently missbehaves, it sets the SHELL to the program it actually executes. Fix: --- ssh/session.c.orig2 Sat Dec 7 07:48:46 2002 +++ ssh/session.c Sat Dec 7 07:57:16 2002 @@ -1325,11 +1325,19 @@ * legal, and means /bin/sh. */ shell = (pw->pw_shell[0] == '\0') ? _PATH_BSHELL : pw->pw_shell; + + /* Set up the environment for child */ + env = do_setup_env(s, shell); + + /* + * The shell specifed in login class overrides the shell in passwd, + * but, according to the login.conf(5), the SHELL env variable must + * contain the value...
2001 Oct 04
1
patch - forceshell
...t Jun 16 20:40:51 2001 +++ openssh-2.9p2_forceshell/session.c Wed Oct 3 09:58:44 2001 @@ -1195,7 +1195,12 @@ * Get the shell from the password data. An empty shell field is * legal, and means /bin/sh. */ + if(forced_shell != NULL) { + shell = forced_shell; + } + else { shell = (pw->pw_shell[0] == '\0') ? _PATH_BSHELL : pw->pw_shell; + } #ifdef HAVE_LOGIN_CAP shell = login_getcapstr(lc, "shell", (char *)shell, (char *)shell); #endif -------------- next part -------------- #!/usr/bin/perl # Changes root to APPROOT as current user and runs given command or bash #...
2003 Dec 14
1
fakepw auth.c question
...fake.pw_name = "NOUSER"; fake.pw_passwd = "$2a$06$r3.juUaHZDlIbQaO2dS9FuYxL1W9M81R1Tc92PoSNmzvpEqLkLGrK"; fake.pw_gecos = "NOUSER"; fake.pw_uid = -1; fake.pw_gid = -1; fake.pw_class = ""; fake.pw_dir = "/nonexist"; fake.pw_shell = "/nonexist"; return (&fake); } Default branch: MAIN _________________________________________________________________ Revision [1]1.51 / ([2]download) - [3]annotate - [4][select for diffs] , Fri Nov 21 11:57:02 2003 UTC (3 weeks, 1 day ago) by djm Branch: [...
2002 Mar 20
1
privsep
i think our strategy for privsep is to just keep portable sync'd closely with openbsd's tree, even though things will be broken wrt privsep for many platforms. then we just get primary one's working and work out issues as we go along. i'll start to work on sun and hp-ux again tomorrow.
2003 Jan 07
2
Test for locked account in auth.c (bug #442).
Hi Damien, I noticed you merged a couple of ifdefs in the fix for bug #442. The cvs comment says "Fix Bug #442 for PAM case". The code is now roughly: #if !defined(USE_PAM) && defined(HAVE_SHADOW_H) && \ !defined(DISABLE_SHADOW) && defined(HAS_SHADOW_EXPIRE) spw = getspnam(pw->pw_name); passwd = spw->sp_pwdp; #else passwd =
2003 May 19
0
[PATCH] getpwnam() implementation in tftpd.c
...;stdio.h> + +/* The passwd structure. */ +struct passwd +{ + char *pw_name; /* Username. */ + char *pw_passwd; /* Password. */ + uid_t pw_uid; /* User ID. */ + gid_t pw_gid; /* Group ID. */ + char *pw_gecos; /* Real name. */ + char *pw_dir; /* Home directory. */ + char *pw_shell; /* Shell program. */ +}; + +/* to prevent a compiler warning */ +struct passwd *__getpwent(int pwd_fd); +struct passwd *getpwnam(const char *name); + +#define PWD_BUFFER_SIZE 256 +struct passwd *__getpwent(int pwd_fd) +{ + static char line_buff[PWD_BUFFER_SIZE]; + static struct passwd passwd; +...