Menu
  • HOME
  • TAGS

bash_profile for new user created through useradd

bash,path,.bash-profile,user-administration

From /etc/skel (or SKEL_DIR from -k) as explained in the man page for the -m/--create-home option most likely. If you don't want that then don't have useradd create the home directory and/or just delete the file after the user is created....

Retrieving user created roles and user info in Azure

tsql,azure,sql-azure,user-administration

Here is what worked: SELECT p.[name] as 'Principal_Name', CASE WHEN p.[type_desc]='SQL_USER' THEN 'User' WHEN p.[type_desc]='DATABASE_ROLE' THEN 'Role' END As 'Principal_Type', --principals2.[name] as 'Grantor', dbpermissions.[state_desc] As 'Permission_Type', dbpermissions.[permission_name] As 'Permission', CASE WHEN so.[type_desc]='USER_TABLE' THEN 'Table' WHEN so.[type_desc]='SQL_STORED_PROCEDURE' THEN 'Stored Proc' WHEN so.[type_desc]='VIEW' THEN 'View' END as 'Object_Type', so.[Name] as 'Object_Name' FROM...