nis

How to run docker with current host user, when users are managed with Linux NIS (Network Information Service)

蹲街弑〆低调 提交于 2021-01-28 11:42:57
问题 I want to run the docker with my host account, Normally I would do it with: #!/bin/bash user_home="${HOME:-"$(eval echo "~$(whoami)")"}" docker run -it --rm \ --env "USER=$(whoami)" \ -u $(id -u ${USER}):$(id -g ${USER}) \ --volume "${user_home}:${user_home}":ro \ --volume /etc/passwd:/etc/passwd:ro \ --volume /etc/group:/etc/group:ro \ "ubuntu" /bin/bash But now I need to do it on a PC that manages users with NIS (network information services) My user is not present in the /etc/passwd What

Authenticating Gitweb with Gitosis without LDAP Auth?

大兔子大兔子 提交于 2020-01-03 12:31:55
问题 I found your article using Apache Auth with gitweb, gitosis. I was wondering if there was a way to do this if I wasn't using LDAP for authentication. We currently have a very large NIS domain which we use for authentication on all unix servers. We use this for SVN repositories through a UI, but for this case I am trying to meet a requirement of: Git Repositories Access Controlled - using Gitolite Online UI - using Gitweb UI must also have Access Control - not yet implemented I was thinking

Using Awk to remove whitespace

夙愿已清 提交于 2019-12-21 06:28:27
问题 I have a file in the form of: Firstname LastName; 123-4567; Job Title Firstname LastName; 123-4567; Job Title Firstname LastName; 123-4567; Job Title ... I am trying to use awk to parse the file into a form readable by makedbm (to make a custom NIS map). Field separator is a semicolon. I need to be able to remove all leading whitespace from each field on each line, but leave the spaces in the name field and the title field. Thanks. 回答1: If you wish to remove leading space from all fields and

Using Awk to remove whitespace

偶尔善良 提交于 2019-12-03 21:55:07
I have a file in the form of: Firstname LastName; 123-4567; Job Title Firstname LastName; 123-4567; Job Title Firstname LastName; 123-4567; Job Title ... I am trying to use awk to parse the file into a form readable by makedbm (to make a custom NIS map). Field separator is a semicolon. I need to be able to remove all leading whitespace from each field on each line, but leave the spaces in the name field and the title field. Thanks. If you wish to remove leading space from all fields and keep the space in between the Names and Job title fields then you can do something like this - awk -F";" -v